From 25ffda7cd4db16efb193e1a40b700db783580552 Mon Sep 17 00:00:00 2001 From: Shay Levy Date: Thu, 27 Jan 2022 12:00:38 +0200 Subject: [PATCH] Fix Shelly battery powered devices unavailable (#65031) --- homeassistant/components/shelly/entity.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/shelly/entity.py b/homeassistant/components/shelly/entity.py index a8546cb43dd..12f82016a1c 100644 --- a/homeassistant/components/shelly/entity.py +++ b/homeassistant/components/shelly/entity.py @@ -562,6 +562,11 @@ class ShellySleepingBlockAttributeEntity(ShellyBlockAttributeEntity, RestoreEnti self.block: Block | None = block # type: ignore[assignment] self.entity_description = description + self._attr_should_poll = False + self._attr_device_info = DeviceInfo( + connections={(device_registry.CONNECTION_NETWORK_MAC, wrapper.mac)} + ) + if block is not None: self._attr_unique_id = f"{self.wrapper.mac}-{block.description}-{attribute}" self._attr_name = get_block_entity_name(