mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix Shelly logbook exception when missing COAP (#47620)
This commit is contained in:
parent
197687399d
commit
24db0ff956
@ -177,9 +177,9 @@ def get_device_wrapper(hass: HomeAssistant, device_id: str):
|
||||
return None
|
||||
|
||||
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 None
|
||||
|
Loading…
x
Reference in New Issue
Block a user