diff --git a/custom_components/composite/device_tracker.py b/custom_components/composite/device_tracker.py index 668de16..6698530 100644 --- a/custom_components/composite/device_tracker.py +++ b/custom_components/composite/device_tracker.py @@ -30,6 +30,7 @@ STATE_HOME, STATE_NOT_HOME, STATE_ON, + STATE_UNAVAILABLE, STATE_UNKNOWN, ) import homeassistant.helpers.config_validation as cv @@ -172,7 +173,7 @@ def _dt_attr_from_utc(self, utc, tzone): return utc def _update_info(self, entity_id, old_state, new_state): - if new_state is None: + if new_state is None or new_state.state in (STATE_UNKNOWN, STATE_UNAVAILABLE): return with self._lock: