Return PRESET_NONE in Honeywell (#108599)

* Return PRESET_NONE

* format preset_hold

* Address Hold in tests

* Add translations
pull/108726/head
mkmer 2024-01-23 09:57:55 -05:00 committed by GitHub
parent 074d59f849
commit f3b1f47d34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 19 additions and 6 deletions

View File

@ -51,7 +51,7 @@ ATTR_FAN_ACTION = "fan_action"
ATTR_PERMANENT_HOLD = "permanent_hold"
PRESET_HOLD = "Hold"
PRESET_HOLD = "hold"
HEATING_MODES = {"heat", "emheat", "auto"}
COOLING_MODES = {"cool", "auto"}
@ -142,6 +142,7 @@ class HoneywellUSThermostat(ClimateEntity):
_attr_has_entity_name = True
_attr_name = None
_attr_translation_key = "honeywell"
def __init__(
self,
@ -303,7 +304,7 @@ class HoneywellUSThermostat(ClimateEntity):
if self._is_permanent_hold():
return PRESET_HOLD
return None
return PRESET_NONE
@property
def is_aux_heat(self) -> bool | None:

View File

@ -40,6 +40,19 @@
"outdoor_humidity": {
"name": "Outdoor humidity"
}
},
"climate": {
"honeywell": {
"state_attributes": {
"preset_mode": {
"state": {
"hold": "Hold",
"away": "[%key:component::climate::entity_component::_::state_attributes::preset_mode::state::away%]",
"none": "[%key:component::climate::entity_component::_::state_attributes::preset_mode::state::none%]"
}
}
}
}
}
}
}

View File

@ -24,11 +24,11 @@
'min_humidity': 30,
'min_temp': -13.9,
'permanent_hold': False,
'preset_mode': None,
'preset_mode': 'none',
'preset_modes': list([
'none',
'away',
'Hold',
'hold',
]),
'supported_features': <ClimateEntityFeature: 95>,
'target_temp_high': None,

View File

@ -28,7 +28,7 @@ from homeassistant.components.climate import (
SERVICE_SET_TEMPERATURE,
HVACMode,
)
from homeassistant.components.honeywell.climate import RETRY, SCAN_INTERVAL
from homeassistant.components.honeywell.climate import PRESET_HOLD, RETRY, SCAN_INTERVAL
from homeassistant.const import (
ATTR_ENTITY_ID,
ATTR_TEMPERATURE,
@ -46,7 +46,6 @@ from . import init_integration, reset_mock
from tests.common import async_fire_time_changed
FAN_ACTION = "fan_action"
PRESET_HOLD = "Hold"
async def test_no_thermostat_options(