python-omnilogic-local 0.28.0__tar.gz → 0.28.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/PKG-INFO +1 -1
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/filter.py +13 -3
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/pump.py +13 -3
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyproject.toml +1 -1
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/LICENSE +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/README.md +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/__init__.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/_base.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/api/__init__.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/api/api.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/api/constants.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/api/exceptions.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/api/mock_api.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/api/protocol.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/backyard.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/bow.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/chlorinator.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/chlorinator_equip.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/__init__.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/cli.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/debug/__init__.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/debug/commands.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/__init__.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/backyard.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/bows.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/chlorinators.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/commands.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/csads.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/filters.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/groups.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/heaters.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/lights.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/pumps.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/relays.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/schedules.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/sensors.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/valves.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/pcap_utils.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/utils.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/collections.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/colorlogiclight.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/csad.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/csad_equip.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/decorators.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/groups.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/heater.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/heater_equip.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/models/__init__.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/models/const.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/models/exceptions.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/models/filter_diagnostics.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/models/leadmessage.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/models/mspconfig.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/models/telemetry.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/omnilogic.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/omnitypes.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/py.typed +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/relay.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/schedule.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/sensor.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/system.py +0 -0
- {python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-omnilogic-local
|
|
3
|
-
Version: 0.28.
|
|
3
|
+
Version: 0.28.1
|
|
4
4
|
Summary: A library for local control of Hayward OmniHub/OmniLogic pool controllers using their local API
|
|
5
5
|
Author: Chris Jowett, djtimca, garionphx
|
|
6
6
|
Author-email: Chris Jowett <421501+cryptk@users.noreply.github.com>
|
|
@@ -6,11 +6,11 @@ from pyomnilogic_local._base import OmniEquipment
|
|
|
6
6
|
from pyomnilogic_local.decorators import control_method
|
|
7
7
|
from pyomnilogic_local.models.mspconfig import MSPFilter
|
|
8
8
|
from pyomnilogic_local.models.telemetry import TelemetryFilter
|
|
9
|
-
from pyomnilogic_local.omnitypes import FilterSpeedPresets, FilterState
|
|
9
|
+
from pyomnilogic_local.omnitypes import FilterSpeedPresets, FilterState, FilterType
|
|
10
10
|
from pyomnilogic_local.util import OmniEquipmentNotInitializedError
|
|
11
11
|
|
|
12
12
|
if TYPE_CHECKING:
|
|
13
|
-
from pyomnilogic_local.omnitypes import
|
|
13
|
+
from pyomnilogic_local.omnitypes import FilterValvePosition, FilterWhyOn
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class Filter(OmniEquipment[MSPFilter, TelemetryFilter]):
|
|
@@ -219,10 +219,20 @@ class Filter(OmniEquipment[MSPFilter, TelemetryFilter]):
|
|
|
219
219
|
msg = "Filter bow_id and system_id must be set"
|
|
220
220
|
raise OmniEquipmentNotInitializedError(msg)
|
|
221
221
|
|
|
222
|
+
# If we are a Variable Speed filter, we want to try to turn on at the last speed setting
|
|
223
|
+
# This matches the behavior of the OmniLogic phone app
|
|
224
|
+
target_speed: int = 100
|
|
225
|
+
match self.equip_type:
|
|
226
|
+
case FilterType.VARIABLE_SPEED:
|
|
227
|
+
if self.last_speed >= self.min_percent and self.last_speed <= self.max_percent:
|
|
228
|
+
target_speed = self.last_speed
|
|
229
|
+
case FilterType.SINGLE_SPEED:
|
|
230
|
+
target_speed = self.max_percent
|
|
231
|
+
|
|
222
232
|
await self._api.async_set_equipment(
|
|
223
233
|
pool_id=self.bow_id,
|
|
224
234
|
equipment_id=self.system_id,
|
|
225
|
-
is_on=
|
|
235
|
+
is_on=target_speed,
|
|
226
236
|
)
|
|
227
237
|
|
|
228
238
|
@control_method
|
|
@@ -6,11 +6,11 @@ from pyomnilogic_local._base import OmniEquipment
|
|
|
6
6
|
from pyomnilogic_local.decorators import control_method
|
|
7
7
|
from pyomnilogic_local.models.mspconfig import MSPPump
|
|
8
8
|
from pyomnilogic_local.models.telemetry import TelemetryPump
|
|
9
|
-
from pyomnilogic_local.omnitypes import PumpSpeedPresets, PumpState
|
|
9
|
+
from pyomnilogic_local.omnitypes import PumpSpeedPresets, PumpState, PumpType
|
|
10
10
|
from pyomnilogic_local.util import OmniEquipmentNotInitializedError
|
|
11
11
|
|
|
12
12
|
if TYPE_CHECKING:
|
|
13
|
-
from pyomnilogic_local.omnitypes import PumpFunction
|
|
13
|
+
from pyomnilogic_local.omnitypes import PumpFunction
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class Pump(OmniEquipment[MSPPump, TelemetryPump]):
|
|
@@ -200,10 +200,20 @@ class Pump(OmniEquipment[MSPPump, TelemetryPump]):
|
|
|
200
200
|
msg = "Pump bow_id and system_id must be set"
|
|
201
201
|
raise OmniEquipmentNotInitializedError(msg)
|
|
202
202
|
|
|
203
|
+
# If we are a Variable Speed pump, we want to try to turn on at the last speed setting
|
|
204
|
+
# This matches the behavior of the OmniLogic phone app
|
|
205
|
+
target_speed: int = 100
|
|
206
|
+
match self.equip_type:
|
|
207
|
+
case PumpType.VARIABLE_SPEED:
|
|
208
|
+
if self.last_speed >= self.min_percent and self.last_speed <= self.max_percent:
|
|
209
|
+
target_speed = self.last_speed
|
|
210
|
+
case PumpType.SINGLE_SPEED:
|
|
211
|
+
target_speed = self.max_percent
|
|
212
|
+
|
|
203
213
|
await self._api.async_set_equipment(
|
|
204
214
|
pool_id=self.bow_id,
|
|
205
215
|
equipment_id=self.system_id,
|
|
206
|
-
is_on=
|
|
216
|
+
is_on=target_speed,
|
|
207
217
|
)
|
|
208
218
|
|
|
209
219
|
@control_method
|
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/api/__init__.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/api/api.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/api/constants.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/api/exceptions.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/api/mock_api.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/api/protocol.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/backyard.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/chlorinator.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/__init__.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/cli.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/bows.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/csads.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/filters.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/groups.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/heaters.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/lights.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/pumps.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/relays.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/sensors.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/get/valves.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/pcap_utils.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/cli/utils.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/collections.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/colorlogiclight.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/csad_equip.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/decorators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/heater_equip.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/models/__init__.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/models/const.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/omnilogic.py
RENAMED
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/omnitypes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_omnilogic_local-0.28.0 → python_omnilogic_local-0.28.1}/pyomnilogic_local/schedule.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|