mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Fix Insteon startup for users with X10 devices (#94277)
This commit is contained in:
parent
c8756ba5bb
commit
fceef42b08
@ -140,6 +140,9 @@ def add_insteon_events(hass: HomeAssistant, device: Device) -> None:
|
|||||||
_LOGGER.debug("Firing event %s with %s", event, schema)
|
_LOGGER.debug("Firing event %s with %s", event, schema)
|
||||||
hass.bus.async_fire(event, schema)
|
hass.bus.async_fire(event, schema)
|
||||||
|
|
||||||
|
if str(device.address).startswith("X10"):
|
||||||
|
return
|
||||||
|
|
||||||
for name_or_group, event in device.events.items():
|
for name_or_group, event in device.events.items():
|
||||||
if isinstance(name_or_group, int):
|
if isinstance(name_or_group, int):
|
||||||
for _, event in device.events[name_or_group].items():
|
for _, event in device.events[name_or_group].items():
|
||||||
@ -166,8 +169,9 @@ def register_new_device_callback(hass):
|
|||||||
await device.async_status()
|
await device.async_status()
|
||||||
platforms = get_device_platforms(device)
|
platforms = get_device_platforms(device)
|
||||||
for platform in platforms:
|
for platform in platforms:
|
||||||
|
groups = get_device_platform_groups(device, platform)
|
||||||
signal = f"{SIGNAL_ADD_ENTITIES}_{platform}"
|
signal = f"{SIGNAL_ADD_ENTITIES}_{platform}"
|
||||||
dispatcher_send(hass, signal, {"address": device.address})
|
dispatcher_send(hass, signal, {"address": device.address, "groups": groups})
|
||||||
add_insteon_events(hass, device)
|
add_insteon_events(hass, device)
|
||||||
|
|
||||||
devices.subscribe(async_new_insteon_device, force_strong_ref=True)
|
devices.subscribe(async_new_insteon_device, force_strong_ref=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user