mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Refactor ZHA device initialized logic (#25796)
* refactor device initialized * better names and update tests * clean up last seen logic * logging consistency
This commit is contained in:
committed by
Alexei Chetroi
parent
dc5c1783dc
commit
fafd228418
@@ -140,7 +140,10 @@ async def async_init_zigpy_device(
|
||||
device = make_device(
|
||||
in_cluster_ids, out_cluster_ids, device_type, ieee, manufacturer, model
|
||||
)
|
||||
await gateway.async_device_initialized(device, is_new_join)
|
||||
if is_new_join:
|
||||
await gateway.async_device_initialized(device)
|
||||
else:
|
||||
await gateway.async_device_restored(device)
|
||||
await hass.async_block_till_done()
|
||||
return device
|
||||
|
||||
|
||||
Reference in New Issue
Block a user