Skip to content

Commit

Permalink
Fix the lock state inverted (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
xZetsubou authored Aug 20, 2024
1 parent 784fd21 commit 42a9e35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/localtuya/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def status_updated(self):
if (lock_state := self.dp_value(CONF_LOCK_STATE_DP)) or lock_state is not None:
state = lock_state

self._attr_is_locked = state not in (False, "closed", "close", None)
self._attr_is_locked = state in (False, "closed", "close", None)

if jammed := self.dp_value(CONF_JAMMED_DP, False):
self._attr_is_jammed = jammed
Expand Down

0 comments on commit 42a9e35

Please sign in to comment.