Skip to content

Commit

Permalink
Add new_join flag (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmulcahey committed Apr 1, 2024
1 parent 8c3de51 commit 3bba510
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zha/application/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ class DeviceFullInitEvent:
"""Event to signal that a device has been fully initialized."""

device_info: ExtendedDeviceInfoWithPairingStatus
new_join: bool = False
event_type: Final[str] = ZHA_GW_MSG
event: Final[str] = ZHA_GW_MSG_DEVICE_FULL_INIT

Expand Down Expand Up @@ -604,7 +605,7 @@ async def _async_device_joined(self, zha_device: Device) -> None:
self.create_platform_entities()
self.emit(
ZHA_GW_MSG_DEVICE_FULL_INIT,
DeviceFullInitEvent(device_info=device_info),
DeviceFullInitEvent(device_info=device_info, new_join=True),
)

async def _async_device_rejoined(self, zha_device: Device) -> None:
Expand Down

0 comments on commit 3bba510

Please sign in to comment.