Skip to content

Commit 1d56820

Browse files
authored
Always fire callbacks when we do a full update since all sensors will update (#162)
1 parent 0547711 commit 1d56820

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

switchbot/devices/device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ async def _async_update_after_operation_wrap(
9696
) -> None:
9797
ret = await func(self, *args, **kwargs)
9898
await self.update()
99-
self._fire_callbacks()
10099
return ret
101100

102101
return cast(WrapFuncType, _async_update_after_operation_wrap)
@@ -520,6 +519,7 @@ async def update(self, interface: int | None = None) -> None:
520519
if info := await self.get_basic_info():
521520
self._last_full_update = time.monotonic()
522521
self._update_parsed_data(info)
522+
self._fire_callbacks()
523523

524524
async def get_basic_info(self) -> dict[str, Any] | None:
525525
"""Get device basic settings."""

0 commit comments

Comments
 (0)