2019-06-13 15:43:57 +00:00
|
|
|
"""Test Alexa entity representation."""
|
|
|
|
from homeassistant.components.alexa import smart_home
|
2019-12-08 13:56:42 +00:00
|
|
|
|
|
|
|
from . import DEFAULT_CONFIG, get_new_request
|
2019-06-13 15:43:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
async def test_unsupported_domain(hass):
|
|
|
|
"""Discovery ignores entities of unknown domains."""
|
2019-07-31 19:25:30 +00:00
|
|
|
request = get_new_request("Alexa.Discovery", "Discover")
|
2019-06-13 15:43:57 +00:00
|
|
|
|
2019-07-31 19:25:30 +00:00
|
|
|
hass.states.async_set("woz.boop", "on", {"friendly_name": "Boop Woz"})
|
2019-06-13 15:43:57 +00:00
|
|
|
|
2019-07-31 19:25:30 +00:00
|
|
|
msg = await smart_home.async_handle_message(hass, DEFAULT_CONFIG, request)
|
2019-06-13 15:43:57 +00:00
|
|
|
|
2019-07-31 19:25:30 +00:00
|
|
|
assert "event" in msg
|
|
|
|
msg = msg["event"]
|
2019-06-13 15:43:57 +00:00
|
|
|
|
2019-07-31 19:25:30 +00:00
|
|
|
assert not msg["payload"]["endpoints"]
|