pytouchlinesl 0.1.8__tar.gz → 0.2.0__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.
- {pytouchlinesl-0.1.8/pytouchlinesl.egg-info → pytouchlinesl-0.2.0}/PKG-INFO +1 -1
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/pyproject.toml +1 -1
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/pytouchlinesl/client/models/models.py +4 -2
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/pytouchlinesl/zone.py +25 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0/pytouchlinesl.egg-info}/PKG-INFO +1 -1
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/tests/test_zone.py +4 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/LICENSE +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/README.md +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/pytouchlinesl/__init__.py +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/pytouchlinesl/client/__init__.py +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/pytouchlinesl/client/base.py +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/pytouchlinesl/client/client.py +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/pytouchlinesl/client/models/__init__.py +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/pytouchlinesl/module.py +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/pytouchlinesl/touchlinesl.py +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/pytouchlinesl.egg-info/SOURCES.txt +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/pytouchlinesl.egg-info/dependency_links.txt +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/pytouchlinesl.egg-info/requires.txt +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/pytouchlinesl.egg-info/top_level.txt +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/setup.cfg +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/tests/test_module.py +0 -0
- {pytouchlinesl-0.1.8 → pytouchlinesl-0.2.0}/tests/test_touchlinesl.py +0 -0
|
@@ -15,7 +15,7 @@ except ImportError:
|
|
|
15
15
|
class ZoneFlagsModel(BaseModel):
|
|
16
16
|
relay_state: str = Field(..., alias="relayState")
|
|
17
17
|
min_one_window_open: bool = Field(..., alias="minOneWindowOpen")
|
|
18
|
-
algorithm:
|
|
18
|
+
algorithm: Literal["heating", "cooling"]
|
|
19
19
|
floor_sensor: int = Field(..., alias="floorSensor")
|
|
20
20
|
humidity_algorytm: int = Field(..., alias="humidityAlgorytm")
|
|
21
21
|
zone_excluded: int = Field(..., alias="zoneExcluded")
|
|
@@ -30,7 +30,9 @@ class ZoneAttributesModel(BaseModel):
|
|
|
30
30
|
current_temperature: Optional[int] = Field(..., alias="currentTemperature")
|
|
31
31
|
set_temperature: int = Field(..., alias="setTemperature")
|
|
32
32
|
flags: ZoneFlagsModel
|
|
33
|
-
zone_state: Literal[
|
|
33
|
+
zone_state: Literal[
|
|
34
|
+
"zoneOff", "noAlarm", "zoneUnregistered", "sensorDamaged", "noCommunication"
|
|
35
|
+
] = Field(..., alias="zoneState")
|
|
34
36
|
signal_strength: Optional[int] = Field(..., alias="signalStrength")
|
|
35
37
|
battery_level: Optional[int] = Field(..., alias="batteryLevel")
|
|
36
38
|
actuators_open: int = Field(..., alias="actuatorsOpen")
|
|
@@ -112,6 +112,31 @@ class Zone:
|
|
|
112
112
|
|
|
113
113
|
return self._schedule
|
|
114
114
|
|
|
115
|
+
@property
|
|
116
|
+
def relay_on(self) -> bool:
|
|
117
|
+
"""Return whether or not the zone's relay is on."""
|
|
118
|
+
return self._raw_data.zone.flags.relay_state == "on"
|
|
119
|
+
|
|
120
|
+
@property
|
|
121
|
+
def algorithm(self) -> Literal["heating", "cooling"]:
|
|
122
|
+
"""Return the zone's current algorithm, either `heating` or `cooling`."""
|
|
123
|
+
return self._raw_data.zone.flags.algorithm
|
|
124
|
+
|
|
125
|
+
@property
|
|
126
|
+
def signal_strength(self) -> int | None:
|
|
127
|
+
"""Return the signal strength of the zone."""
|
|
128
|
+
return self._raw_data.zone.signal_strength
|
|
129
|
+
|
|
130
|
+
@property
|
|
131
|
+
def alarm(self) -> Literal["sensor_damaged", "no_communication"] | None:
|
|
132
|
+
"""Return the alarm state of the zone."""
|
|
133
|
+
state = self._raw_data.zone.zone_state
|
|
134
|
+
if state == "sensorDamaged":
|
|
135
|
+
return "sensor_damaged"
|
|
136
|
+
elif state == "noCommunication":
|
|
137
|
+
return "no_communication"
|
|
138
|
+
return None
|
|
139
|
+
|
|
115
140
|
async def set_temperature(self, temperature: float):
|
|
116
141
|
"""Set a constant target temperature for the zone."""
|
|
117
142
|
await self._client.set_zone_temperature(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|