From 09692143d097c0e278adcbd6eca214723cfc711e Mon Sep 17 00:00:00 2001 From: OleksandrBerchenko Date: Thu, 21 Feb 2019 15:48:17 +0200 Subject: [PATCH] Correctly detect devices, which went offline during HA restart (#20933) * Correctly detect devices, which went offline during HA restart * Update __init__.py --- homeassistant/components/device_tracker/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/device_tracker/__init__.py b/homeassistant/components/device_tracker/__init__.py index af33453c9d5..7d8449197de 100644 --- a/homeassistant/components/device_tracker/__init__.py +++ b/homeassistant/components/device_tracker/__init__.py @@ -580,6 +580,7 @@ class Device(RestoreEntity): return self._state = state.state self.last_update_home = (state.state == STATE_HOME) + self.last_seen = dt_util.utcnow() for attr, var in ( (ATTR_SOURCE_TYPE, 'source_type'),