mirror of
https://github.com/home-assistant/core.git
synced 2025-05-30 02:37:04 +00:00
Handle Shelly get name on uninitialized device (#53917)
This commit is contained in:
parent
df03cce471
commit
71375be54d
@ -29,7 +29,7 @@ def async_describe_events(
|
||||
def async_describe_shelly_click_event(event: EventType) -> dict[str, str]:
|
||||
"""Describe shelly.click logbook event."""
|
||||
wrapper = get_device_wrapper(hass, event.data[ATTR_DEVICE_ID])
|
||||
if wrapper:
|
||||
if wrapper and wrapper.device.initialized:
|
||||
device_name = get_device_name(wrapper.device)
|
||||
else:
|
||||
device_name = event.data[ATTR_DEVICE]
|
||||
|
Loading…
x
Reference in New Issue
Block a user