Correct issue on new device joins in ZHA (#33470)
This commit is contained in:
parent
0e6aacb440
commit
3d73f166be
2 changed files with 6 additions and 3 deletions
|
@ -5,6 +5,7 @@ import collections
|
|||
import itertools
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import traceback
|
||||
from typing import List, Optional
|
||||
|
||||
|
@ -478,7 +479,9 @@ class ZHAGateway:
|
|||
async def async_device_initialized(self, device: zha_typing.ZigpyDeviceType):
|
||||
"""Handle device joined and basic information discovered (async)."""
|
||||
zha_device = self._async_get_or_create_device(device)
|
||||
|
||||
# This is an active device so set a last seen if it is none
|
||||
if zha_device.last_seen is None:
|
||||
zha_device.async_update_last_seen(time.time())
|
||||
_LOGGER.debug(
|
||||
"device - %s:%s entering async_device_initialized - is_new_join: %s",
|
||||
device.nwk,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue