From 0dbfbd88d1725bf6221e2c8f3a10b236d2bd07f6 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 12 Mar 2023 16:05:46 -1000 Subject: [PATCH] Only write state if status has changed for shelly RPC devices --- homeassistant/components/shelly/entity.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/homeassistant/components/shelly/entity.py b/homeassistant/components/shelly/entity.py index e13e2547a3..65ad365d72 100644 --- a/homeassistant/components/shelly/entity.py +++ b/homeassistant/components/shelly/entity.py @@ -387,6 +387,8 @@ class ShellyRpcEntity(CoordinatorEntity[ShellyRpcCoordinator]): @callback def _update_callback(self) -> None: """Handle device update.""" + # We will get callbacks whenever the device updates, but we only want to + # update state if the status key we care about has changed. if self.status != self._last_status: self._last_status = self.status self.async_write_ha_state()