Add Airzone Cloud air/floor demand binary sensors (#120103)
This commit is contained in:
parent
97a025ccc1
commit
f353b3fa54
3 changed files with 30 additions and 0 deletions
|
@ -8,8 +8,10 @@ from typing import Any, Final
|
|||
from aioairzone_cloud.const import (
|
||||
AZD_ACTIVE,
|
||||
AZD_AIDOOS,
|
||||
AZD_AIR_DEMAND,
|
||||
AZD_AQ_ACTIVE,
|
||||
AZD_ERRORS,
|
||||
AZD_FLOOR_DEMAND,
|
||||
AZD_PROBLEMS,
|
||||
AZD_SYSTEMS,
|
||||
AZD_WARNINGS,
|
||||
|
@ -77,10 +79,20 @@ ZONE_BINARY_SENSOR_TYPES: Final[tuple[AirzoneBinarySensorEntityDescription, ...]
|
|||
device_class=BinarySensorDeviceClass.RUNNING,
|
||||
key=AZD_ACTIVE,
|
||||
),
|
||||
AirzoneBinarySensorEntityDescription(
|
||||
device_class=BinarySensorDeviceClass.RUNNING,
|
||||
key=AZD_AIR_DEMAND,
|
||||
translation_key="air_demand",
|
||||
),
|
||||
AirzoneBinarySensorEntityDescription(
|
||||
key=AZD_AQ_ACTIVE,
|
||||
translation_key="air_quality_active",
|
||||
),
|
||||
AirzoneBinarySensorEntityDescription(
|
||||
device_class=BinarySensorDeviceClass.RUNNING,
|
||||
key=AZD_FLOOR_DEMAND,
|
||||
translation_key="floor_demand",
|
||||
),
|
||||
AirzoneBinarySensorEntityDescription(
|
||||
attributes={
|
||||
"warnings": AZD_WARNINGS,
|
||||
|
|
|
@ -18,8 +18,14 @@
|
|||
},
|
||||
"entity": {
|
||||
"binary_sensor": {
|
||||
"air_demand": {
|
||||
"name": "Air demand"
|
||||
},
|
||||
"air_quality_active": {
|
||||
"name": "Air Quality active"
|
||||
},
|
||||
"floor_demand": {
|
||||
"name": "Floor demand"
|
||||
}
|
||||
},
|
||||
"select": {
|
||||
|
|
|
@ -41,9 +41,15 @@ async def test_airzone_create_binary_sensors(hass: HomeAssistant) -> None:
|
|||
assert state.attributes.get("warnings") is None
|
||||
|
||||
# Zones
|
||||
state = hass.states.get("binary_sensor.dormitorio_air_demand")
|
||||
assert state.state == STATE_OFF
|
||||
|
||||
state = hass.states.get("binary_sensor.dormitorio_air_quality_active")
|
||||
assert state.state == STATE_OFF
|
||||
|
||||
state = hass.states.get("binary_sensor.dormitorio_floor_demand")
|
||||
assert state.state == STATE_OFF
|
||||
|
||||
state = hass.states.get("binary_sensor.dormitorio_problem")
|
||||
assert state.state == STATE_OFF
|
||||
assert state.attributes.get("warnings") is None
|
||||
|
@ -51,9 +57,15 @@ async def test_airzone_create_binary_sensors(hass: HomeAssistant) -> None:
|
|||
state = hass.states.get("binary_sensor.dormitorio_running")
|
||||
assert state.state == STATE_OFF
|
||||
|
||||
state = hass.states.get("binary_sensor.salon_air_demand")
|
||||
assert state.state == STATE_ON
|
||||
|
||||
state = hass.states.get("binary_sensor.salon_air_quality_active")
|
||||
assert state.state == STATE_OFF
|
||||
|
||||
state = hass.states.get("binary_sensor.salon_floor_demand")
|
||||
assert state.state == STATE_OFF
|
||||
|
||||
state = hass.states.get("binary_sensor.salon_problem")
|
||||
assert state.state == STATE_OFF
|
||||
assert state.attributes.get("warnings") is None
|
||||
|
|
Loading…
Add table
Reference in a new issue