mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Add Airzone Cloud zone thermostat sensors (#122648)
* airzone_cloud: sensor: add zone thermostat sensors Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> * airzone_cloud: sensor: add missing signal percentage icon Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> * airzone_cloud: sensor: add signal percentage translation Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> * airzone_cloud: sensor: disable thermostat_coverage Also add to diagnostics category. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> * Update homeassistant/components/airzone_cloud/strings.json Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> --------- Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
parent
53131390ac
commit
d3d522c463
9
homeassistant/components/airzone_cloud/icons.json
Normal file
9
homeassistant/components/airzone_cloud/icons.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"thermostat_coverage": {
|
||||||
|
"default": "mdi:signal"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -12,6 +12,8 @@ from aioairzone_cloud.const import (
|
|||||||
AZD_AQ_PM_10,
|
AZD_AQ_PM_10,
|
||||||
AZD_HUMIDITY,
|
AZD_HUMIDITY,
|
||||||
AZD_TEMP,
|
AZD_TEMP,
|
||||||
|
AZD_THERMOSTAT_BATTERY,
|
||||||
|
AZD_THERMOSTAT_COVERAGE,
|
||||||
AZD_WEBSERVERS,
|
AZD_WEBSERVERS,
|
||||||
AZD_WIFI_RSSI,
|
AZD_WIFI_RSSI,
|
||||||
AZD_ZONES,
|
AZD_ZONES,
|
||||||
@ -98,6 +100,20 @@ ZONE_SENSOR_TYPES: Final[tuple[SensorEntityDescription, ...]] = (
|
|||||||
native_unit_of_measurement=PERCENTAGE,
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
|
SensorEntityDescription(
|
||||||
|
device_class=SensorDeviceClass.BATTERY,
|
||||||
|
key=AZD_THERMOSTAT_BATTERY,
|
||||||
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
),
|
||||||
|
SensorEntityDescription(
|
||||||
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
|
entity_registry_enabled_default=False,
|
||||||
|
key=AZD_THERMOSTAT_COVERAGE,
|
||||||
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
|
translation_key="thermostat_coverage",
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,6 +37,11 @@
|
|||||||
"auto": "Auto"
|
"auto": "Auto"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"sensor": {
|
||||||
|
"thermostat_coverage": {
|
||||||
|
"name": "Signal percentage"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,9 @@ async def test_airzone_create_sensors(hass: HomeAssistant) -> None:
|
|||||||
state = hass.states.get("sensor.dormitorio_air_quality_index")
|
state = hass.states.get("sensor.dormitorio_air_quality_index")
|
||||||
assert state.state == "1"
|
assert state.state == "1"
|
||||||
|
|
||||||
|
state = hass.states.get("sensor.dormitorio_battery")
|
||||||
|
assert state.state == "54"
|
||||||
|
|
||||||
state = hass.states.get("sensor.dormitorio_pm1")
|
state = hass.states.get("sensor.dormitorio_pm1")
|
||||||
assert state.state == "3"
|
assert state.state == "3"
|
||||||
|
|
||||||
@ -40,6 +43,9 @@ async def test_airzone_create_sensors(hass: HomeAssistant) -> None:
|
|||||||
state = hass.states.get("sensor.dormitorio_pm10")
|
state = hass.states.get("sensor.dormitorio_pm10")
|
||||||
assert state.state == "3"
|
assert state.state == "3"
|
||||||
|
|
||||||
|
state = hass.states.get("sensor.dormitorio_signal_percentage")
|
||||||
|
assert state.state == "76"
|
||||||
|
|
||||||
state = hass.states.get("sensor.dormitorio_temperature")
|
state = hass.states.get("sensor.dormitorio_temperature")
|
||||||
assert state.state == "25.0"
|
assert state.state == "25.0"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user