mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +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."""
|
||||
super().__init__(device_config, api, description.key)
|
||||
self.entity_description = description
|
||||
# run update to have device_class set depending on unit_of_measurement
|
||||
self.update()
|
||||
|
||||
@property
|
||||
def available(self) -> bool:
|
||||
|
Loading…
x
Reference in New Issue
Block a user