mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Add permanent_hold attribute to Honeywell climate (#45341)
This commit is contained in:
parent
c03b4d8aee
commit
d284c6369e
@ -53,6 +53,8 @@ CONF_LOC_ID = "location"
|
||||
DEFAULT_COOL_AWAY_TEMPERATURE = 88
|
||||
DEFAULT_HEAT_AWAY_TEMPERATURE = 61
|
||||
|
||||
ATTR_PERMANENT_HOLD = "permanent_hold"
|
||||
|
||||
PLATFORM_SCHEMA = vol.All(
|
||||
cv.deprecated(CONF_REGION),
|
||||
PLATFORM_SCHEMA.extend(
|
||||
@ -199,6 +201,7 @@ class HoneywellUSThermostat(ClimateEntity):
|
||||
"""Return the device specific state attributes."""
|
||||
data = {}
|
||||
data[ATTR_FAN_ACTION] = "running" if self._device.fan_running else "idle"
|
||||
data[ATTR_PERMANENT_HOLD] = self._is_permanent_hold()
|
||||
if self._device.raw_dr_data:
|
||||
data["dr_phase"] = self._device.raw_dr_data.get("Phase")
|
||||
return data
|
||||
@ -306,6 +309,11 @@ class HoneywellUSThermostat(ClimateEntity):
|
||||
"""Return the list of available fan modes."""
|
||||
return list(self._fan_mode_map)
|
||||
|
||||
def _is_permanent_hold(self) -> bool:
|
||||
heat_status = self._device.raw_ui_data.get("StatusHeat", 0)
|
||||
cool_status = self._device.raw_ui_data.get("StatusCool", 0)
|
||||
return heat_status == 2 or cool_status == 2
|
||||
|
||||
def _set_temperature(self, **kwargs) -> None:
|
||||
"""Set new target temperature."""
|
||||
temperature = kwargs.get(ATTR_TEMPERATURE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user