Skip to content

Commit

Permalink
Update deprecated constant for temperature
Browse files Browse the repository at this point in the history
  • Loading branch information
ross-w committed Oct 31, 2024
1 parent c58446f commit 3fb3fb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/emeraldenergy/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"issue_tracker": "https://github.com/ross-w/emerald-hws-ha/issues",
"requirements": ["emerald_hws==0.0.9"],
"ssdp": [],
"version": "1.0.0",
"version": "1.0.1",
"zeroconf": []
}
4 changes: 2 additions & 2 deletions custom_components/emeraldenergy/water_heater.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
WaterHeaterEntityFeature, WaterHeaterEntity,
STATE_HEAT_PUMP, STATE_OFF, STATE_PERFORMANCE, STATE_ECO)
from homeassistant.const import (
CONF_USERNAME, CONF_PASSWORD, TEMP_CELSIUS, PRECISION_WHOLE)
CONF_USERNAME, CONF_PASSWORD, UnitOfTemperature, PRECISION_WHOLE)
from emerald_hws.emeraldhws import EmeraldHWS

_LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -115,7 +115,7 @@ def operation_list(self) -> list[str]:
@property
def temperature_unit(self) -> str:
"""Return the temperature unit."""
return TEMP_CELSIUS
return UnitOfTemperature.CELSIUS

def modeToOpState(self, mode):
"""Return the HASS state given an Emerald internal int state."""
Expand Down

0 comments on commit 3fb3fb4

Please sign in to comment.