diff --git a/homeassistant/components/shelly/__init__.py b/homeassistant/components/shelly/__init__.py index 84bc73f3c0f..537caf9707f 100644 --- a/homeassistant/components/shelly/__init__.py +++ b/homeassistant/components/shelly/__init__.py @@ -220,6 +220,10 @@ class ShellyDeviceWrapper(update_coordinator.DataUpdateCoordinator): async def _async_update_data(self): """Fetch data.""" + if self.entry.data.get("sleep_period"): + # Sleeping device, no point polling it, just mark it unavailable + raise update_coordinator.UpdateFailed("Sleeping device did not update") + _LOGGER.debug("Polling Shelly Device - %s", self.name) try: async with async_timeout.timeout(POLLING_TIMEOUT_SEC): diff --git a/homeassistant/components/shelly/entity.py b/homeassistant/components/shelly/entity.py index b934a41728f..71ab4703c79 100644 --- a/homeassistant/components/shelly/entity.py +++ b/homeassistant/components/shelly/entity.py @@ -421,7 +421,7 @@ class ShellySleepingBlockAttributeEntity(ShellyBlockAttributeEntity, RestoreEnti @callback def _update_callback(self): """Handle device update.""" - if self.block is not None: + if self.block is not None or not self.wrapper.device.initialized: super()._update_callback() return