diff --git a/custom_components/localtuya/lock.py b/custom_components/localtuya/lock.py index f25035c48..37125011f 100644 --- a/custom_components/localtuya/lock.py +++ b/custom_components/localtuya/lock.py @@ -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