hass-core/tests/components/voip/test_select.py
Michael Hansen 65454c945d
Add VAD sensitivity option to VoIP devices (#94688)
* Add VAD sensitivity option to VoIP devices

* Use select entitiy for VAD sensitivity

* Add sensitivity to tests

* Add to assist pipeline tests

* Update homeassistant/components/assist_pipeline/select.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Update tests/components/voip/test_voip.py

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-06-23 23:28:13 -04:00

34 lines
1,023 B
Python

"""Test VoIP select."""
from homeassistant.components.voip.devices import VoIPDevice
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
async def test_pipeline_select(
hass: HomeAssistant,
config_entry: ConfigEntry,
voip_device: VoIPDevice,
) -> None:
"""Test pipeline select.
Functionality is tested in assist_pipeline/test_select.py.
This test is only to ensure it is set up.
"""
state = hass.states.get("select.192_168_1_210_assist_pipeline")
assert state is not None
assert state.state == "preferred"
async def test_vad_sensitivity_select(
hass: HomeAssistant,
config_entry: ConfigEntry,
voip_device: VoIPDevice,
) -> None:
"""Test VAD sensitivity select.
Functionality is tested in assist_pipeline/test_select.py.
This test is only to ensure it is set up.
"""
state = hass.states.get("select.192_168_1_210_silence_sensitivity")
assert state is not None
assert state.state == "default"