mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 13:45:12 +02:00
Add new sensors tests
This commit is contained in:
@@ -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"
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user