Skip to content

Commit

Permalink
Merge pull request #46 from kkoenen/patch-1
Browse files Browse the repository at this point in the history
Fix for issue #42
  • Loading branch information
artmg authored Feb 24, 2023
2 parents ce23f22 + 6dedb42 commit 4c10cc6
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions warmup/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
from homeassistant.exceptions import InvalidStateError, PlatformNotReady
import homeassistant.helpers.config_validation as cv
from homeassistant.util import Throttle
from homeassistant.util.temperature import convert as convert_temperature

""" temperature utility will stop working in HA 2023.4. Removed it for now, as CELCIUS is the only temperature standard this module supports anyway. """
# from homeassistant.util.temperature import convert as convert_temperature

DOMAIN = "warmup"
CONFIG_SCHEMA = vol.Schema(
Expand Down Expand Up @@ -313,16 +315,18 @@ def state_attributes(self) -> Dict[str, Any]:
@property
def min_temp(self):
"""Return the minimum temperature."""
return convert_temperature(
self._device.min_temp, TEMP_CELSIUS, self.hass.config.units.temperature_unit
)
# return convert_temperature(
# self._device.min_temp, TEMP_CELSIUS, self.hass.config.units.temperature_unit
# )
return self._device.min_temp

@property
def max_temp(self):
"""Return the maximum temperature."""
return convert_temperature(
self._device.max_temp, TEMP_CELSIUS, self.hass.config.units.temperature_unit
)
# return convert_temperature(
# self._device.max_temp, TEMP_CELSIUS, self.hass.config.units.temperature_unit
# )
return self._device.max_temp

@property
def supported_features(self):
Expand Down

0 comments on commit 4c10cc6

Please sign in to comment.