[Draft] Use user's preferred temperature unit instead of hardcoding celsius (#460)

* Use user's preferred temperature unit instead of hardcoding celsius

* Fix warnings about using is instead of == in tests
This commit is contained in:
Matt Bush
2024-05-12 22:47:04 -07:00
committed by GitHub
parent 189418e69a
commit 6bd1b1137e
6 changed files with 33 additions and 33 deletions

View File

@@ -663,7 +663,7 @@ class UnderlyingClimate(UnderlyingEntity):
def temperature_unit(self) -> str:
"""Get the temperature_unit"""
if not self.is_initialized:
return UnitOfTemperature.CELSIUS
return self._hass.config.units.temperature_unit
return self._underlying_climate.temperature_unit
@property