mirror of
https://github.com/home-assistant/core.git
synced 2025-08-09 07:35:08 +02:00
Fix Shelly logbook exception when missing COAP (#47620)
This commit is contained in:
@@ -177,9 +177,9 @@ def get_device_wrapper(hass: HomeAssistant, device_id: str):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
for config_entry in hass.data[DOMAIN][DATA_CONFIG_ENTRY]:
|
for config_entry in hass.data[DOMAIN][DATA_CONFIG_ENTRY]:
|
||||||
wrapper = hass.data[DOMAIN][DATA_CONFIG_ENTRY][config_entry][COAP]
|
wrapper = hass.data[DOMAIN][DATA_CONFIG_ENTRY][config_entry].get(COAP)
|
||||||
|
|
||||||
if wrapper.device_id == device_id:
|
if wrapper and wrapper.device_id == device_id:
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
Reference in New Issue
Block a user