mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Fix exception when last Shelly device is removed (#45476)
This commit is contained in:
parent
80c2efa9f2
commit
5bc4db5ef9
@ -172,6 +172,9 @@ def get_input_triggers(
|
||||
|
||||
def get_device_wrapper(hass: HomeAssistant, device_id: str):
|
||||
"""Get a Shelly device wrapper for the given device id."""
|
||||
if not hass.data.get(DOMAIN):
|
||||
return None
|
||||
|
||||
for config_entry in hass.data[DOMAIN][DATA_CONFIG_ENTRY]:
|
||||
wrapper = hass.data[DOMAIN][DATA_CONFIG_ENTRY][config_entry][COAP]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user