Correctly detect devices, which went offline during HA restart ()

* Correctly detect devices, which went offline during HA restart

* Update __init__.py
This commit is contained in:
OleksandrBerchenko 2019-02-21 15:48:17 +02:00 committed by Pascal Vizeli
parent 0f8575f939
commit 09692143d0

View file

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