python-omnilogic-local 0.12.1__tar.gz → 0.13.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (18) hide show
  1. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/PKG-INFO +1 -1
  2. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyomnilogic_local/models/mspconfig.py +11 -1
  3. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyomnilogic_local/models/telemetry.py +12 -0
  4. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyomnilogic_local/types.py +6 -0
  5. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyproject.toml +1 -1
  6. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/LICENSE +0 -0
  7. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/README.md +0 -0
  8. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyomnilogic_local/__init__.py +0 -0
  9. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyomnilogic_local/api.py +0 -0
  10. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyomnilogic_local/cli.py +0 -0
  11. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyomnilogic_local/exceptions.py +0 -0
  12. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyomnilogic_local/models/__init__.py +0 -0
  13. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyomnilogic_local/models/const.py +0 -0
  14. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyomnilogic_local/models/filter_diagnostics.py +0 -0
  15. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyomnilogic_local/models/leadmessage.py +0 -0
  16. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyomnilogic_local/models/util.py +0 -0
  17. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyomnilogic_local/protocol.py +0 -0
  18. {python_omnilogic_local-0.12.1 → python_omnilogic_local-0.13.1}/pyomnilogic_local/util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-omnilogic-local
3
- Version: 0.12.1
3
+ Version: 0.13.1
4
4
  Summary: A library for local control of Hayward OmniHub/OmniLogic pool controllers using their local API
5
5
  Home-page: https://github.com/cryptk/python-omnilogic-local
6
6
  License: Apache-2.0
@@ -18,6 +18,7 @@ from ..types import (
18
18
  ChlorinatorDispenserType,
19
19
  ColorLogicLightType,
20
20
  ColorLogicShow,
21
+ CSADType,
21
22
  FilterType,
22
23
  HeaterType,
23
24
  OmniType,
@@ -162,6 +163,13 @@ class MSPChlorinator(OmniBase):
162
163
  self.chlorinator_equipment = [MSPChlorinatorEquip.parse_obj(equip) for equip in chlorinator_equip_data[OmniType.CHLORINATOR_EQUIP]]
163
164
 
164
165
 
166
+ class MSPCSAD(OmniBase):
167
+ omni_type: OmniType = OmniType.CSAD
168
+ enabled: Literal["yes", "no"] = Field(alias="Enabled")
169
+ type: CSADType | str = Field(alias="Type")
170
+ target_value: float = Field(alias="TargetValue")
171
+
172
+
165
173
  class MSPColorLogicLight(OmniBase):
166
174
  omni_type: OmniType = OmniType.CL_LIGHT
167
175
  type: ColorLogicLightType | str = Field(alias="Type")
@@ -174,7 +182,7 @@ class MSPColorLogicLight(OmniBase):
174
182
 
175
183
 
176
184
  class MSPBoW(OmniBase):
177
- _sub_devices = {"filter", "relay", "heater", "sensor", "colorlogic_light", "pump", "chlorinator"}
185
+ _sub_devices = {"filter", "relay", "heater", "sensor", "colorlogic_light", "pump", "chlorinator", "csad"}
178
186
 
179
187
  omni_type: OmniType = OmniType.BOW
180
188
  type: BodyOfWaterType | str = Field(alias="Type")
@@ -186,6 +194,7 @@ class MSPBoW(OmniBase):
186
194
  colorlogic_light: list[MSPColorLogicLight] | None = Field(alias="ColorLogic-Light")
187
195
  pump: list[MSPPump] | None = Field(alias="Pump")
188
196
  chlorinator: MSPChlorinator | None = Field(alias="Chlorinator")
197
+ csad: list[MSPCSAD] | None = Field(alias="CSAD")
189
198
 
190
199
  # We override the __init__ here so that we can trigger the propagation of the bow_id down to all of it's sub devices after the bow
191
200
  # itself is initialized
@@ -232,6 +241,7 @@ class MSPConfig(BaseModel):
232
241
  force_list=(
233
242
  OmniType.BOW_MSP,
234
243
  OmniType.CHLORINATOR_EQUIP,
244
+ OmniType.CSAD,
235
245
  OmniType.CL_LIGHT,
236
246
  OmniType.FAVORITES,
237
247
  OmniType.FILTER,
@@ -13,6 +13,7 @@ from ..types import (
13
13
  ColorLogicPowerState,
14
14
  ColorLogicShow,
15
15
  ColorLogicSpeed,
16
+ CSADMode,
16
17
  FilterState,
17
18
  FilterValvePosition,
18
19
  FilterWhyOn,
@@ -79,6 +80,15 @@ class TelemetryChlorinator(BaseModel):
79
80
  # return self.status_raw & 4 == 4 # Check if bit 4 is set, which means the chlorinator is currently chlorinating
80
81
 
81
82
 
83
+ class TelemetryCSAD(BaseModel):
84
+ omni_type: OmniType = OmniType.CSAD
85
+ system_id: int = Field(alias="@systemId")
86
+ status_raw: int = Field(alias="@status")
87
+ ph: float = Field(alias="@ph")
88
+ orp: int = Field(alias="@orp")
89
+ mode: CSADMode | int = Field(alias="@mode")
90
+
91
+
82
92
  class TelemetryColorLogicLight(BaseModel):
83
93
  omni_type: OmniType = OmniType.CL_LIGHT
84
94
  system_id: int = Field(alias="@systemId")
@@ -172,6 +182,7 @@ class Telemetry(BaseModel):
172
182
  bow: list[TelemetryBoW] = Field(alias="BodyOfWater")
173
183
  chlorinator: list[TelemetryChlorinator] | None = Field(alias="Chlorinator")
174
184
  colorlogic_light: list[TelemetryColorLogicLight] | None = Field(alias="ColorLogic-Light")
185
+ csad: list[TelemetryCSAD] | None = Field(alias="CSAD")
175
186
  filter: list[TelemetryFilter] | None = Field(alias="Filter")
176
187
  group: list[TelemetryGroup] | None = Field(alias="Group")
177
188
  heater: list[TelemetryHeater] | None = Field(alias="Heater")
@@ -223,6 +234,7 @@ class Telemetry(BaseModel):
223
234
  force_list=(
224
235
  OmniType.BOW,
225
236
  OmniType.CHLORINATOR,
237
+ OmniType.CSAD,
226
238
  OmniType.CL_LIGHT,
227
239
  OmniType.FILTER,
228
240
  OmniType.GROUP,
@@ -46,6 +46,7 @@ class OmniType(str, Enum):
46
46
  BOW_MSP = "Body-of-water"
47
47
  CHLORINATOR = "Chlorinator"
48
48
  CHLORINATOR_EQUIP = "Chlorinator-Equipment"
49
+ CSAD = "CSAD"
49
50
  CL_LIGHT = "ColorLogic-Light"
50
51
  FAVORITES = "Favorites"
51
52
  FILTER = "Filter"
@@ -162,6 +163,11 @@ class ColorLogicLightType(str, PrettyEnum):
162
163
  TWO_FIVE = "COLOR_LOGIC_2_5"
163
164
 
164
165
 
166
+ class CSADType(str, PrettyEnum):
167
+ ACID = "ACID"
168
+ CO2 = "CO2"
169
+
170
+
165
171
  # Chemistry Sense and Dispense
166
172
  class CSADStatus(PrettyEnum):
167
173
  NOT_DISPENSING = 0
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "python-omnilogic-local"
3
- version = "0.12.1"
3
+ version = "0.13.1"
4
4
  description = "A library for local control of Hayward OmniHub/OmniLogic pool controllers using their local API"
5
5
  authors = ["cryptk <cryptk@users.noreply.github.com>", "djtimca", "garionphx"]
6
6
  license = "Apache-2.0"