mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 08:07:45 +00:00
parent
252f05e0f7
commit
cc4340b80c
@ -932,7 +932,9 @@ async def async_setup_entry(
|
|||||||
await hass.async_add_executor_job(
|
await hass.async_add_executor_job(
|
||||||
_build_entities,
|
_build_entities,
|
||||||
device_list,
|
device_list,
|
||||||
)
|
),
|
||||||
|
# run update to have device_class set depending on unit_of_measurement
|
||||||
|
True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -950,8 +952,6 @@ 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