From 24f3fd35c9950c703ab35d8a74ec4b86a139162f Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 18 Nov 2021 17:37:52 +0100 Subject: [PATCH] Fix shorthand native value type in sensor entity component (#59908) --- homeassistant/components/sensor/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/sensor/__init__.py b/homeassistant/components/sensor/__init__.py index 58a9fe4022e..ca083a0480d 100644 --- a/homeassistant/components/sensor/__init__.py +++ b/homeassistant/components/sensor/__init__.py @@ -174,7 +174,7 @@ class SensorEntity(Entity): entity_description: SensorEntityDescription _attr_last_reset: datetime | None # Deprecated, to be removed in 2021.11 _attr_native_unit_of_measurement: str | None - _attr_native_value: StateType = None + _attr_native_value: StateType | date | datetime = None _attr_state_class: str | None _attr_state: None = None # Subclasses of SensorEntity should not set this _attr_unit_of_measurement: None = (