mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add Airzone Cloud air/floor demand binary sensors (#120103)
This commit is contained in:
parent
97a025ccc1
commit
f353b3fa54
@ -8,8 +8,10 @@ from typing import Any, Final
|
|||||||
from aioairzone_cloud.const import (
|
from aioairzone_cloud.const import (
|
||||||
AZD_ACTIVE,
|
AZD_ACTIVE,
|
||||||
AZD_AIDOOS,
|
AZD_AIDOOS,
|
||||||
|
AZD_AIR_DEMAND,
|
||||||
AZD_AQ_ACTIVE,
|
AZD_AQ_ACTIVE,
|
||||||
AZD_ERRORS,
|
AZD_ERRORS,
|
||||||
|
AZD_FLOOR_DEMAND,
|
||||||
AZD_PROBLEMS,
|
AZD_PROBLEMS,
|
||||||
AZD_SYSTEMS,
|
AZD_SYSTEMS,
|
||||||
AZD_WARNINGS,
|
AZD_WARNINGS,
|
||||||
@ -77,10 +79,20 @@ ZONE_BINARY_SENSOR_TYPES: Final[tuple[AirzoneBinarySensorEntityDescription, ...]
|
|||||||
device_class=BinarySensorDeviceClass.RUNNING,
|
device_class=BinarySensorDeviceClass.RUNNING,
|
||||||
key=AZD_ACTIVE,
|
key=AZD_ACTIVE,
|
||||||
),
|
),
|
||||||
|
AirzoneBinarySensorEntityDescription(
|
||||||
|
device_class=BinarySensorDeviceClass.RUNNING,
|
||||||
|
key=AZD_AIR_DEMAND,
|
||||||
|
translation_key="air_demand",
|
||||||
|
),
|
||||||
AirzoneBinarySensorEntityDescription(
|
AirzoneBinarySensorEntityDescription(
|
||||||
key=AZD_AQ_ACTIVE,
|
key=AZD_AQ_ACTIVE,
|
||||||
translation_key="air_quality_active",
|
translation_key="air_quality_active",
|
||||||
),
|
),
|
||||||
|
AirzoneBinarySensorEntityDescription(
|
||||||
|
device_class=BinarySensorDeviceClass.RUNNING,
|
||||||
|
key=AZD_FLOOR_DEMAND,
|
||||||
|
translation_key="floor_demand",
|
||||||
|
),
|
||||||
AirzoneBinarySensorEntityDescription(
|
AirzoneBinarySensorEntityDescription(
|
||||||
attributes={
|
attributes={
|
||||||
"warnings": AZD_WARNINGS,
|
"warnings": AZD_WARNINGS,
|
||||||
|
@ -18,8 +18,14 @@
|
|||||||
},
|
},
|
||||||
"entity": {
|
"entity": {
|
||||||
"binary_sensor": {
|
"binary_sensor": {
|
||||||
|
"air_demand": {
|
||||||
|
"name": "Air demand"
|
||||||
|
},
|
||||||
"air_quality_active": {
|
"air_quality_active": {
|
||||||
"name": "Air Quality active"
|
"name": "Air Quality active"
|
||||||
|
},
|
||||||
|
"floor_demand": {
|
||||||
|
"name": "Floor demand"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"select": {
|
"select": {
|
||||||
|
@ -41,9 +41,15 @@ async def test_airzone_create_binary_sensors(hass: HomeAssistant) -> None:
|
|||||||
assert state.attributes.get("warnings") is None
|
assert state.attributes.get("warnings") is None
|
||||||
|
|
||||||
# Zones
|
# 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")
|
state = hass.states.get("binary_sensor.dormitorio_air_quality_active")
|
||||||
assert state.state == STATE_OFF
|
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")
|
state = hass.states.get("binary_sensor.dormitorio_problem")
|
||||||
assert state.state == STATE_OFF
|
assert state.state == STATE_OFF
|
||||||
assert state.attributes.get("warnings") is None
|
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")
|
state = hass.states.get("binary_sensor.dormitorio_running")
|
||||||
assert state.state == STATE_OFF
|
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")
|
state = hass.states.get("binary_sensor.salon_air_quality_active")
|
||||||
assert state.state == STATE_OFF
|
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")
|
state = hass.states.get("binary_sensor.salon_problem")
|
||||||
assert state.state == STATE_OFF
|
assert state.state == STATE_OFF
|
||||||
assert state.attributes.get("warnings") is None
|
assert state.attributes.get("warnings") is None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user