Skip to content

Commit 1da9bb7

Browse files
committed
_relay_lock: only replace after state_update
1 parent 904e6e4 commit 1da9bb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,8 +721,8 @@ async def _relay_update_lock(self, state: bool) -> None:
721721
if self._relay_lock.state is None or self._relay_lock.state:
722722
state_update = True
723723

724-
self._relay_lock = replace(self._relay_lock, state=state)
725724
if state_update:
725+
self._relay_lock = replace(self._relay_lock, state=state)
726726
await self.publish_feature_update_to_subscribers(
727727
NodeFeature.RELAY_LOCK, self._relay_lock
728728
)

0 commit comments

Comments
 (0)