From aff12cb39880349da6409f0b2f7f521c4d55a54d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20=C3=98yvind=20=C3=98ygard?= <17528+peroo@users.noreply.github.com> Date: Sun, 17 Nov 2024 18:18:56 +0100 Subject: [PATCH] fix: add missing field types for `zone_state` (#7) --- pytouchlinesl/client/models/models.py | 4 +++- tests/sample-data/module.json | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pytouchlinesl/client/models/models.py b/pytouchlinesl/client/models/models.py index ab04c92..b630424 100644 --- a/pytouchlinesl/client/models/models.py +++ b/pytouchlinesl/client/models/models.py @@ -30,7 +30,9 @@ class ZoneAttributesModel(BaseModel): current_temperature: Optional[int] = Field(..., alias="currentTemperature") set_temperature: int = Field(..., alias="setTemperature") flags: ZoneFlagsModel - zone_state: Literal["zoneOff", "noAlarm", "zoneUnregistered"] = Field(..., alias="zoneState") + zone_state: Literal[ + "zoneOff", "noAlarm", "zoneUnregistered", "sensorDamaged", "noCommunication" + ] = Field(..., alias="zoneState") signal_strength: Optional[int] = Field(..., alias="signalStrength") battery_level: Optional[int] = Field(..., alias="batteryLevel") actuators_open: int = Field(..., alias="actuatorsOpen") diff --git a/tests/sample-data/module.json b/tests/sample-data/module.json index b43cdc4..5a23629 100644 --- a/tests/sample-data/module.json +++ b/tests/sample-data/module.json @@ -467,7 +467,7 @@ "humidityAlgorytm": 0, "zoneExcluded": 0 }, - "zoneState": "noAlarm", + "zoneState": "sensorDamaged", "signalStrength": 31, "batteryLevel": 100, "actuatorsOpen": 0, @@ -659,7 +659,7 @@ "humidityAlgorytm": 0, "zoneExcluded": 0 }, - "zoneState": "noAlarm", + "zoneState": "noCommunication", "signalStrength": 13, "batteryLevel": 100, "actuatorsOpen": 0,