mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +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_COOL_AWAY_TEMPERATURE = 88
|
||||||
DEFAULT_HEAT_AWAY_TEMPERATURE = 61
|
DEFAULT_HEAT_AWAY_TEMPERATURE = 61
|
||||||
|
|
||||||
|
ATTR_PERMANENT_HOLD = "permanent_hold"
|
||||||
|
|
||||||
PLATFORM_SCHEMA = vol.All(
|
PLATFORM_SCHEMA = vol.All(
|
||||||
cv.deprecated(CONF_REGION),
|
cv.deprecated(CONF_REGION),
|
||||||
PLATFORM_SCHEMA.extend(
|
PLATFORM_SCHEMA.extend(
|
||||||
@ -199,6 +201,7 @@ class HoneywellUSThermostat(ClimateEntity):
|
|||||||
"""Return the device specific state attributes."""
|
"""Return the device specific state attributes."""
|
||||||
data = {}
|
data = {}
|
||||||
data[ATTR_FAN_ACTION] = "running" if self._device.fan_running else "idle"
|
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:
|
if self._device.raw_dr_data:
|
||||||
data["dr_phase"] = self._device.raw_dr_data.get("Phase")
|
data["dr_phase"] = self._device.raw_dr_data.get("Phase")
|
||||||
return data
|
return data
|
||||||
@ -306,6 +309,11 @@ class HoneywellUSThermostat(ClimateEntity):
|
|||||||
"""Return the list of available fan modes."""
|
"""Return the list of available fan modes."""
|
||||||
return list(self._fan_mode_map)
|
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:
|
def _set_temperature(self, **kwargs) -> None:
|
||||||
"""Set new target temperature."""
|
"""Set new target temperature."""
|
||||||
temperature = kwargs.get(ATTR_TEMPERATURE)
|
temperature = kwargs.get(ATTR_TEMPERATURE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user