Skip to content

Commit

Permalink
Merge pull request #182 from inc-ali/main
Browse files Browse the repository at this point in the history
fix: Set default value for None #181
  • Loading branch information
kvj authored Jan 20, 2024
2 parents efd4de0 + 62a92fe commit bb6f395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/nuki_ng/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def state(self):
def get_state(self) -> DoorSecurityStates:
lock_state = LockStates(self.last_state.get("state", LockStates.UNDEFINED.value))
door_sensor_state = DoorSensorStates(
self.last_state.get("doorsensorState"), DoorSensorStates.UNKNOWN.value)
self.last_state.get("doorsensorState", DoorSensorStates.UNKNOWN.value))

if lock_state == LockStates.LOCKED and door_sensor_state == DoorSensorStates.DOOR_CLOSED:
return DoorSecurityStates.CLOSED_AND_LOCKED
Expand Down

0 comments on commit bb6f395

Please sign in to comment.