Handle unavailable input_select in Google Assistant (#38611)

This commit is contained in:
Paulus Schoutsen committed 2020-08-07 08:44:07 +00:00
1 parent 790a136c0a
commit 6baded622b
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": {
@@ -1433,6 +1433,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(