Update display categories in Alexa (#41626)
* Add new display categories from Alexa Smart Home API * Update Vacuum entities to use VACUUM_CLEANER category. * Update Automation entities to use ACTIVITY_TRIGGER category. * Update tests for Automation entities to use ACTIVITY_TRIGGER category.
This commit is contained in:
1 parent
13f0ea506e
commit
178b2d8c22
2 files changed
+53
-19
No files matched your search
@@ -1490,7 +1490,7 @@ async def test_automation(hass):
|
||||
appliance = await discovery_test(device, hass)
|
||||
|
||||
assert appliance["endpointId"] == "automation#test"
|
||||
assert appliance["displayCategories"][0] == "OTHER"
|
||||
assert appliance["displayCategories"][0] == "ACTIVITY_TRIGGER"
|
||||
assert appliance["friendlyName"] == "Test automation"
|
||||
assert_endpoint_capabilities(
|
||||
appliance, "Alexa.PowerController", "Alexa.EndpointHealth", "Alexa"
|
||||
@@ -3296,10 +3296,7 @@ async def test_media_player_sound_mode_list_unsupported(hass):
|
||||
|
||||
# Test equalizer controller is not there
|
||||
assert_endpoint_capabilities(
|
||||
appliance,
|
||||
"Alexa",
|
||||
"Alexa.PowerController",
|
||||
"Alexa.EndpointHealth",
|
||||
appliance, "Alexa", "Alexa.PowerController", "Alexa.EndpointHealth"
|
||||
)
|
||||
|
||||
|
||||
@@ -3459,7 +3456,7 @@ async def test_vacuum_discovery(hass):
|
||||
appliance = await discovery_test(device, hass)
|
||||
|
||||
assert appliance["endpointId"] == "vacuum#test_1"
|
||||
assert appliance["displayCategories"][0] == "OTHER"
|
||||
assert appliance["displayCategories"][0] == "VACUUM_CLEANER"
|
||||
assert appliance["friendlyName"] == "Test vacuum 1"
|
||||
|
||||
assert_endpoint_capabilities(
|
||||
@@ -3502,7 +3499,7 @@ async def test_vacuum_fan_speed(hass):
|
||||
appliance = await discovery_test(device, hass)
|
||||
|
||||
assert appliance["endpointId"] == "vacuum#test_2"
|
||||
assert appliance["displayCategories"][0] == "OTHER"
|
||||
assert appliance["displayCategories"][0] == "VACUUM_CLEANER"
|
||||
assert appliance["friendlyName"] == "Test vacuum 2"
|
||||
|
||||
capabilities = assert_endpoint_capabilities(
|
||||
@@ -3834,10 +3831,7 @@ async def test_camera_hass_urls(hass, mock_stream, url, result):
|
||||
"idle",
|
||||
{"friendly_name": "Test camera", "supported_features": 3},
|
||||
)
|
||||
await async_process_ha_core_config(
|
||||
hass,
|
||||
{"external_url": url},
|
||||
)
|
||||
await async_process_ha_core_config(hass, {"external_url": url})
|
||||
|
||||
appliance = await discovery_test(device, hass)
|
||||
assert len(appliance["capabilities"]) == result
|
||||
@@ -3850,8 +3844,7 @@ async def test_initialize_camera_stream(hass, mock_camera, mock_stream):
|
||||
)
|
||||
|
||||
await async_process_ha_core_config(
|
||||
hass,
|
||||
{"external_url": "https://mycamerastream.test"},
|
||||
hass, {"external_url": "https://mycamerastream.test"}
|
||||
)
|
||||
|
||||
with patch(
|
||||
|
||||
Reference in new issue
Block a user