Release v2.0.0

This commit is contained in:
SMKRV
2024-11-24 00:56:33 +03:00
parent ca1d79f848
commit 2fe84ab801
+8
View File
@@ -100,6 +100,14 @@ class HATextAISensor(CoordinatorEntity, SensorEntity):
return dt_util.as_local(last_response['timestamp'])
return self._current_state
@property
def state(self) -> StateType:
"""Return the state of the sensor."""
last_response = self.coordinator.last_response
if last_response and 'timestamp' in last_response:
return dt_util.as_local(last_response['timestamp'])
return self._current_state
@property
def extra_state_attributes(self) -> Dict[str, Any]:
"""Return entity specific state attributes."""