Skip to content

Commit

Permalink
fix: add missing field types for zone_state (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
peroo authored Nov 17, 2024
1 parent 853cd3c commit aff12cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion pytouchlinesl/client/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions tests/sample-data/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@
"humidityAlgorytm": 0,
"zoneExcluded": 0
},
"zoneState": "noAlarm",
"zoneState": "sensorDamaged",
"signalStrength": 31,
"batteryLevel": 100,
"actuatorsOpen": 0,
Expand Down Expand Up @@ -659,7 +659,7 @@
"humidityAlgorytm": 0,
"zoneExcluded": 0
},
"zoneState": "noAlarm",
"zoneState": "noCommunication",
"signalStrength": 13,
"batteryLevel": 100,
"actuatorsOpen": 0,
Expand Down

0 comments on commit aff12cb

Please sign in to comment.