Add Airzone Cloud Air Quality zone binary sensors (#106573)
* airzone_cloud: add Air Quality binary sensor Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> * airzone_cloud: binary_sensor: rename Air Quality Add "active" to indicate status. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> --------- Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
d3d6870c04
commit
766596abdc
3 changed files with 18 additions and 0 deletions
|
@ -7,6 +7,7 @@ from typing import Any, Final
|
|||
from aioairzone_cloud.const import (
|
||||
AZD_ACTIVE,
|
||||
AZD_AIDOOS,
|
||||
AZD_AQ_ACTIVE,
|
||||
AZD_ERRORS,
|
||||
AZD_PROBLEMS,
|
||||
AZD_SYSTEMS,
|
||||
|
@ -76,6 +77,10 @@ ZONE_BINARY_SENSOR_TYPES: Final[tuple[AirzoneBinarySensorEntityDescription, ...]
|
|||
device_class=BinarySensorDeviceClass.RUNNING,
|
||||
key=AZD_ACTIVE,
|
||||
),
|
||||
AirzoneBinarySensorEntityDescription(
|
||||
key=AZD_AQ_ACTIVE,
|
||||
translation_key="air_quality_active",
|
||||
),
|
||||
AirzoneBinarySensorEntityDescription(
|
||||
attributes={
|
||||
"warnings": AZD_WARNINGS,
|
||||
|
|
|
@ -15,5 +15,12 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"binary_sensor": {
|
||||
"air_quality_active": {
|
||||
"name": "Air Quality active"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,9 @@ 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_quality_active")
|
||||
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
|
||||
|
@ -48,6 +51,9 @@ 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_quality_active")
|
||||
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