mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix Shelly sleeping device initialization after reconfiguration (#48076)
This commit is contained in:
parent
7b717bc437
commit
0f5efca76b
@ -75,6 +75,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
||||
dev_reg = await device_registry.async_get_registry(hass)
|
||||
identifier = (DOMAIN, entry.unique_id)
|
||||
device_entry = dev_reg.async_get_device(identifiers={identifier}, connections=set())
|
||||
if entry.entry_id not in device_entry.config_entries:
|
||||
device_entry = None
|
||||
|
||||
sleep_period = entry.data.get("sleep_period")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user