Fix device class on sensor in ViCare (#122334)
update device class on init
This commit is contained in:
parent
fd6f1cfbdc
commit
f135d3d16c
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue