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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 = (