Add new sensors tests

This commit is contained in:
Cosimo Meli
2024-02-04 19:02:43 +00:00
parent 6daa3c7fa3
commit d632a64027
2 changed files with 16 additions and 3 deletions

View File

@@ -32,6 +32,10 @@ async def test_binary_sensor(
assert motion_state.state == "on"
assert motion_state.attributes["device_class"] == "motion"
ding_state = hass.states.get("binary_sensor.front_door_ding")
assert ding_state is not None
assert ding_state.state == "off"
front_ding_state = hass.states.get("binary_sensor.front_door_ding")
assert front_ding_state is not None
assert front_ding_state.state == "off"
ingress_ding_state = hass.states.get("binary_sensor.ingress_ding")
assert ingress_ding_state is not None
assert ingress_ding_state.state == "off"

View File

@@ -38,6 +38,15 @@ async def test_sensor(hass: HomeAssistant, requests_mock: requests_mock.Mocker)
"sensor.downstairs_wifi_signal_strength"
)
ingress_mic_volume_state = hass.states.get("sensor.ingress_mic_volume")
assert ingress_mic_volume_state.state == "11"
ingress_doorbell_volume_state = hass.states.get("sensor.ingress_doorbell_volume")
assert ingress_doorbell_volume_state.state == "8"
ingress_voice_volume_state = hass.states.get("sensor.ingress_voice_volume")
assert ingress_voice_volume_state.state == "11"
if not WIFI_ENABLED:
return