mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix unit of measurement usage in COSignal (#75856)
This commit is contained in:
parent
25d943d272
commit
4f56028491
@ -103,8 +103,8 @@ class CO2Sensor(CoordinatorEntity[CO2SignalCoordinator], SensorEntity):
|
|||||||
@property
|
@property
|
||||||
def native_unit_of_measurement(self) -> str | None:
|
def native_unit_of_measurement(self) -> str | None:
|
||||||
"""Return the unit of measurement."""
|
"""Return the unit of measurement."""
|
||||||
if self.entity_description.unit_of_measurement:
|
if self.entity_description.native_unit_of_measurement:
|
||||||
return self.entity_description.unit_of_measurement
|
return self.entity_description.native_unit_of_measurement
|
||||||
return cast(
|
return cast(
|
||||||
str, self.coordinator.data["units"].get(self.entity_description.key)
|
str, self.coordinator.data["units"].get(self.entity_description.key)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user