mirror of
https://github.com/home-assistant/core.git
synced 2026-05-25 01:40:15 +01:00
79ee2e954b
* Use SIP URI for VoIP device identifier Use the SIP URI instead of just host/IP address to identify VoIP devices. This will allow calls initiating from Home Assistant to the device as well as allows devices connecting through a PBX to be uniquely identified. * Add tests --------- Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
36 lines
1.0 KiB
Python
36 lines
1.0 KiB
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.sip_192_168_1_210_5060_assistant")
|
|
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.sip_192_168_1_210_5060_finished_speaking_detection")
|
|
assert state is not None
|
|
assert state.state == "default"
|