Handle unavailable input_select in Google Assistant (#38611)

This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-08-07 08:17:00 +02:00
1 parent 6d0d5548e5
commit 881b6a831d
3 files changed
+45 -39

No files matched your search

@@ -337,8 +337,6 @@ async def test_execute(hass):
const.SOURCE_CLOUD,
)
print(result)
assert result == {
"requestId": REQ_ID,
"payload": {
@@ -1515,6 +1515,11 @@ async def test_modes_input_select(hass):
assert helpers.get_google_type(input_select.DOMAIN, None) is not None
assert trait.ModesTrait.supported(input_select.DOMAIN, None, None)
trt = trait.ModesTrait(
hass, State("input_select.bla", "unavailable"), BASIC_CONFIG,
)
assert trt.sync_attributes() == {"availableModes": []}
trt = trait.ModesTrait(
hass,
State(