diff --git a/pytouchlinesl/zone.py b/pytouchlinesl/zone.py index 368fb6f..1ea9e02 100644 --- a/pytouchlinesl/zone.py +++ b/pytouchlinesl/zone.py @@ -122,6 +122,21 @@ def algorithm(self) -> Literal["heating", "cooling"]: """Return the zone's current algorithm, either `heating` or `cooling`.""" return self._raw_data.zone.flags.algorithm + @property + def signal_strength(self) -> int | None: + """Return the signal strength of the zone.""" + return self._raw_data.zone.signal_strength + + @property + def alarm(self) -> Literal["sensor_damaged", "no_communication"] | None: + """Return the alarm state of the zone.""" + state = self._raw_data.zone.zone_state + if state == "sensorDamaged": + return "sensor_damaged" + elif state == "noCommunication": + return "no_communication" + return None + async def set_temperature(self, temperature: float): """Set a constant target temperature for the zone.""" await self._client.set_zone_temperature( diff --git a/tests/test_zone.py b/tests/test_zone.py index dec9ace..88bfd43 100644 --- a/tests/test_zone.py +++ b/tests/test_zone.py @@ -8,6 +8,8 @@ ("enabled", True), ("relay_on", True), ("algorithm", "heating"), + ("signal_strength", 53), + ("alarm", None), ]