Correct issue on new device joins in ZHA (#33470)

This commit is contained in:
David F. Mulcahey 2020-04-01 08:41:16 -04:00 committed by GitHub
parent 0e6aacb440
commit 3d73f166be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -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,