Fix shorthand native value type in sensor entity component (#59908)

This commit is contained in:
Franck Nijhof
2021-11-18 17:37:52 +01:00
committed by GitHub
parent d18c250acf
commit 24f3fd35c9

View File

@@ -174,7 +174,7 @@ class SensorEntity(Entity):
entity_description: SensorEntityDescription entity_description: SensorEntityDescription
_attr_last_reset: datetime | None # Deprecated, to be removed in 2021.11 _attr_last_reset: datetime | None # Deprecated, to be removed in 2021.11
_attr_native_unit_of_measurement: str | None _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_class: str | None
_attr_state: None = None # Subclasses of SensorEntity should not set this _attr_state: None = None # Subclasses of SensorEntity should not set this
_attr_unit_of_measurement: None = ( _attr_unit_of_measurement: None = (