2022-03-08 21:28:39 +00:00
|
|
|
"""The sensor tests for the Airzone platform."""
|
|
|
|
|
2022-04-02 08:01:49 +00:00
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
|
2022-03-08 21:28:39 +00:00
|
|
|
from .util import async_init_integration
|
|
|
|
|
|
|
|
|
2022-05-14 00:23:18 +00:00
|
|
|
async def test_airzone_create_sensors(
|
2023-03-26 13:21:19 +00:00
|
|
|
hass: HomeAssistant, entity_registry_enabled_by_default: None
|
2022-05-14 00:23:18 +00:00
|
|
|
) -> None:
|
2022-03-08 21:28:39 +00:00
|
|
|
"""Test creation of sensors."""
|
|
|
|
|
|
|
|
await async_init_integration(hass)
|
|
|
|
|
2022-05-14 00:23:18 +00:00
|
|
|
# WebServer
|
|
|
|
state = hass.states.get("sensor.webserver_rssi")
|
|
|
|
assert state.state == "-42"
|
|
|
|
|
|
|
|
# Zones
|
2022-03-08 21:28:39 +00:00
|
|
|
state = hass.states.get("sensor.despacho_temperature")
|
2023-01-25 07:55:46 +00:00
|
|
|
assert state.state == "21.20"
|
2022-03-08 21:28:39 +00:00
|
|
|
|
|
|
|
state = hass.states.get("sensor.despacho_humidity")
|
|
|
|
assert state.state == "36"
|
|
|
|
|
|
|
|
state = hass.states.get("sensor.dorm_1_temperature")
|
|
|
|
assert state.state == "20.8"
|
|
|
|
|
|
|
|
state = hass.states.get("sensor.dorm_1_humidity")
|
|
|
|
assert state.state == "35"
|
|
|
|
|
|
|
|
state = hass.states.get("sensor.dorm_2_temperature")
|
|
|
|
assert state.state == "20.5"
|
|
|
|
|
|
|
|
state = hass.states.get("sensor.dorm_2_humidity")
|
|
|
|
assert state.state == "40"
|
|
|
|
|
|
|
|
state = hass.states.get("sensor.dorm_ppal_temperature")
|
|
|
|
assert state.state == "21.1"
|
|
|
|
|
|
|
|
state = hass.states.get("sensor.dorm_ppal_humidity")
|
|
|
|
assert state.state == "39"
|
|
|
|
|
|
|
|
state = hass.states.get("sensor.salon_temperature")
|
|
|
|
assert state.state == "19.6"
|
|
|
|
|
|
|
|
state = hass.states.get("sensor.salon_humidity")
|
|
|
|
assert state.state == "34"
|
2022-12-28 15:37:50 +00:00
|
|
|
|
|
|
|
state = hass.states.get("sensor.airzone_2_1_temperature")
|
|
|
|
assert state.state == "22.3"
|
|
|
|
|
|
|
|
state = hass.states.get("sensor.airzone_2_1_humidity")
|
|
|
|
assert state.state == "62"
|