mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix device class on sensor in ViCare (#122334)
update device class on init
This commit is contained in:
parent
fd6f1cfbdc
commit
f135d3d16c
@ -950,6 +950,8 @@ class ViCareSensor(ViCareEntity, SensorEntity):
|
|||||||
"""Initialize the sensor."""
|
"""Initialize the sensor."""
|
||||||
super().__init__(device_config, api, description.key)
|
super().__init__(device_config, api, description.key)
|
||||||
self.entity_description = description
|
self.entity_description = description
|
||||||
|
# run update to have device_class set depending on unit_of_measurement
|
||||||
|
self.update()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def available(self) -> bool:
|
def available(self) -> bool:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user