Improve Airzone Cloud tests (#102377)
This commit is contained in:
parent
7d9014ae41
commit
e319b04fde
1 changed files with 36 additions and 36 deletions
|
@ -41,9 +41,9 @@ async def test_airzone_create_climates(hass: HomeAssistant) -> None:
|
|||
state = hass.states.get("climate.bron")
|
||||
assert state.state == HVACMode.OFF
|
||||
assert state.attributes.get(ATTR_CURRENT_HUMIDITY) is None
|
||||
assert state.attributes.get(ATTR_CURRENT_TEMPERATURE) == 21.0
|
||||
assert state.attributes.get(ATTR_HVAC_ACTION) == HVACAction.OFF
|
||||
assert state.attributes.get(ATTR_HVAC_MODES) == [
|
||||
assert state.attributes[ATTR_CURRENT_TEMPERATURE] == 21.0
|
||||
assert state.attributes[ATTR_HVAC_ACTION] == HVACAction.OFF
|
||||
assert state.attributes[ATTR_HVAC_MODES] == [
|
||||
HVACMode.HEAT_COOL,
|
||||
HVACMode.COOL,
|
||||
HVACMode.HEAT,
|
||||
|
@ -51,28 +51,28 @@ async def test_airzone_create_climates(hass: HomeAssistant) -> None:
|
|||
HVACMode.DRY,
|
||||
HVACMode.OFF,
|
||||
]
|
||||
assert state.attributes.get(ATTR_MAX_TEMP) == 30
|
||||
assert state.attributes.get(ATTR_MIN_TEMP) == 15
|
||||
assert state.attributes.get(ATTR_TARGET_TEMP_STEP) == API_TEMPERATURE_STEP
|
||||
assert state.attributes.get(ATTR_TEMPERATURE) == 22.0
|
||||
assert state.attributes[ATTR_MAX_TEMP] == 30
|
||||
assert state.attributes[ATTR_MIN_TEMP] == 15
|
||||
assert state.attributes[ATTR_TARGET_TEMP_STEP] == API_TEMPERATURE_STEP
|
||||
assert state.attributes[ATTR_TEMPERATURE] == 22.0
|
||||
|
||||
# Groups
|
||||
state = hass.states.get("climate.group")
|
||||
assert state.state == HVACMode.COOL
|
||||
assert state.attributes.get(ATTR_CURRENT_HUMIDITY) == 27
|
||||
assert state.attributes.get(ATTR_CURRENT_TEMPERATURE) == 22.5
|
||||
assert state.attributes.get(ATTR_HVAC_ACTION) == HVACAction.COOLING
|
||||
assert state.attributes.get(ATTR_HVAC_MODES) == [
|
||||
assert state.attributes[ATTR_CURRENT_HUMIDITY] == 27
|
||||
assert state.attributes[ATTR_CURRENT_TEMPERATURE] == 22.5
|
||||
assert state.attributes[ATTR_HVAC_ACTION] == HVACAction.COOLING
|
||||
assert state.attributes[ATTR_HVAC_MODES] == [
|
||||
HVACMode.COOL,
|
||||
HVACMode.HEAT,
|
||||
HVACMode.FAN_ONLY,
|
||||
HVACMode.DRY,
|
||||
HVACMode.OFF,
|
||||
]
|
||||
assert state.attributes.get(ATTR_MAX_TEMP) == 30
|
||||
assert state.attributes.get(ATTR_MIN_TEMP) == 15
|
||||
assert state.attributes.get(ATTR_TARGET_TEMP_STEP) == API_TEMPERATURE_STEP
|
||||
assert state.attributes.get(ATTR_TEMPERATURE) == 24.0
|
||||
assert state.attributes[ATTR_MAX_TEMP] == 30
|
||||
assert state.attributes[ATTR_MIN_TEMP] == 15
|
||||
assert state.attributes[ATTR_TARGET_TEMP_STEP] == API_TEMPERATURE_STEP
|
||||
assert state.attributes[ATTR_TEMPERATURE] == 24.0
|
||||
|
||||
# Installations
|
||||
state = hass.states.get("climate.house")
|
||||
|
@ -96,37 +96,37 @@ async def test_airzone_create_climates(hass: HomeAssistant) -> None:
|
|||
# Zones
|
||||
state = hass.states.get("climate.dormitorio")
|
||||
assert state.state == HVACMode.OFF
|
||||
assert state.attributes.get(ATTR_CURRENT_HUMIDITY) == 24
|
||||
assert state.attributes.get(ATTR_CURRENT_TEMPERATURE) == 25.0
|
||||
assert state.attributes.get(ATTR_HVAC_ACTION) == HVACAction.OFF
|
||||
assert state.attributes.get(ATTR_HVAC_MODES) == [
|
||||
assert state.attributes[ATTR_CURRENT_HUMIDITY] == 24
|
||||
assert state.attributes[ATTR_CURRENT_TEMPERATURE] == 25.0
|
||||
assert state.attributes[ATTR_HVAC_ACTION] == HVACAction.OFF
|
||||
assert state.attributes[ATTR_HVAC_MODES] == [
|
||||
HVACMode.COOL,
|
||||
HVACMode.HEAT,
|
||||
HVACMode.FAN_ONLY,
|
||||
HVACMode.DRY,
|
||||
HVACMode.OFF,
|
||||
]
|
||||
assert state.attributes.get(ATTR_MAX_TEMP) == 30
|
||||
assert state.attributes.get(ATTR_MIN_TEMP) == 15
|
||||
assert state.attributes.get(ATTR_TARGET_TEMP_STEP) == API_TEMPERATURE_STEP
|
||||
assert state.attributes.get(ATTR_TEMPERATURE) == 24.0
|
||||
assert state.attributes[ATTR_MAX_TEMP] == 30
|
||||
assert state.attributes[ATTR_MIN_TEMP] == 15
|
||||
assert state.attributes[ATTR_TARGET_TEMP_STEP] == API_TEMPERATURE_STEP
|
||||
assert state.attributes[ATTR_TEMPERATURE] == 24.0
|
||||
|
||||
state = hass.states.get("climate.salon")
|
||||
assert state.state == HVACMode.COOL
|
||||
assert state.attributes.get(ATTR_CURRENT_HUMIDITY) == 30
|
||||
assert state.attributes.get(ATTR_CURRENT_TEMPERATURE) == 20.0
|
||||
assert state.attributes.get(ATTR_HVAC_ACTION) == HVACAction.COOLING
|
||||
assert state.attributes.get(ATTR_HVAC_MODES) == [
|
||||
assert state.attributes[ATTR_CURRENT_HUMIDITY] == 30
|
||||
assert state.attributes[ATTR_CURRENT_TEMPERATURE] == 20.0
|
||||
assert state.attributes[ATTR_HVAC_ACTION] == HVACAction.COOLING
|
||||
assert state.attributes[ATTR_HVAC_MODES] == [
|
||||
HVACMode.COOL,
|
||||
HVACMode.HEAT,
|
||||
HVACMode.FAN_ONLY,
|
||||
HVACMode.DRY,
|
||||
HVACMode.OFF,
|
||||
]
|
||||
assert state.attributes.get(ATTR_MAX_TEMP) == 30
|
||||
assert state.attributes.get(ATTR_MIN_TEMP) == 15
|
||||
assert state.attributes.get(ATTR_TARGET_TEMP_STEP) == API_TEMPERATURE_STEP
|
||||
assert state.attributes.get(ATTR_TEMPERATURE) == 24.0
|
||||
assert state.attributes[ATTR_MAX_TEMP] == 30
|
||||
assert state.attributes[ATTR_MIN_TEMP] == 15
|
||||
assert state.attributes[ATTR_TARGET_TEMP_STEP] == API_TEMPERATURE_STEP
|
||||
assert state.attributes[ATTR_TEMPERATURE] == 24.0
|
||||
|
||||
|
||||
async def test_airzone_climate_turn_on_off(hass: HomeAssistant) -> None:
|
||||
|
@ -441,7 +441,7 @@ async def test_airzone_climate_set_temp(hass: HomeAssistant) -> None:
|
|||
)
|
||||
|
||||
state = hass.states.get("climate.group")
|
||||
assert state.attributes.get(ATTR_TEMPERATURE) == 20.5
|
||||
assert state.attributes[ATTR_TEMPERATURE] == 20.5
|
||||
|
||||
# Installations
|
||||
with patch(
|
||||
|
@ -477,7 +477,7 @@ async def test_airzone_climate_set_temp(hass: HomeAssistant) -> None:
|
|||
)
|
||||
|
||||
state = hass.states.get("climate.salon")
|
||||
assert state.attributes.get(ATTR_TEMPERATURE) == 20.5
|
||||
assert state.attributes[ATTR_TEMPERATURE] == 20.5
|
||||
|
||||
|
||||
async def test_airzone_climate_set_temp_error(hass: HomeAssistant) -> None:
|
||||
|
@ -501,7 +501,7 @@ async def test_airzone_climate_set_temp_error(hass: HomeAssistant) -> None:
|
|||
)
|
||||
|
||||
state = hass.states.get("climate.bron")
|
||||
assert state.attributes.get(ATTR_TEMPERATURE) == 22.0
|
||||
assert state.attributes[ATTR_TEMPERATURE] == 22.0
|
||||
|
||||
# Groups
|
||||
with patch(
|
||||
|
@ -519,7 +519,7 @@ async def test_airzone_climate_set_temp_error(hass: HomeAssistant) -> None:
|
|||
)
|
||||
|
||||
state = hass.states.get("climate.group")
|
||||
assert state.attributes.get(ATTR_TEMPERATURE) == 24.0
|
||||
assert state.attributes[ATTR_TEMPERATURE] == 24.0
|
||||
|
||||
# Installations
|
||||
with patch(
|
||||
|
@ -555,4 +555,4 @@ async def test_airzone_climate_set_temp_error(hass: HomeAssistant) -> None:
|
|||
)
|
||||
|
||||
state = hass.states.get("climate.salon")
|
||||
assert state.attributes.get(ATTR_TEMPERATURE) == 24.0
|
||||
assert state.attributes[ATTR_TEMPERATURE] == 24.0
|
||||
|
|
Loading…
Add table
Reference in a new issue