Skip to content

Commit ed2f44d

Browse files
authored
Update status instead of overwriting it when pooling (#782)
* Update status instead of overwriting it when pooling * Improve condition
1 parent 6892cd8 commit ed2f44d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aioshelly/rpc_device/device.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,9 @@ async def poll(self) -> None:
284284
results = await self.call_rpc_multiple(calls, DEVICE_POLL_TIMEOUT)
285285
if (status := results[0]) is None:
286286
raise RpcCallError("empty response to Shelly.GetStatus")
287-
self._status = status
287+
if self._status is None:
288+
raise NotInitialized
289+
self._status.update(status)
288290
if has_dynamic:
289291
if (dynamic := results[1]) is None:
290292
raise RpcCallError("empty response to Shelly.GetComponents")

0 commit comments

Comments
 (0)