Make alexa and google aware of DEVICE_CLASS_GATE (#35103)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-05-03 13:29:12 -07:00
1 parent 2af984917e
commit 6f6c670b3b
3 files changed
+26 -2

No files matched your search

+23
View File
@@ -4,6 +4,7 @@ import pytest
from homeassistant.components.alexa import messages, smart_home
import homeassistant.components.camera as camera
from homeassistant.components.cover import DEVICE_CLASS_GATE
from homeassistant.components.media_player.const import (
SUPPORT_NEXT_TRACK,
SUPPORT_PAUSE,
@@ -2630,6 +2631,28 @@ async def test_cover_garage_door(hass):
)
async def test_cover_gate(hass):
"""Test gate cover discovery."""
device = (
"cover.test_gate",
"off",
{
"friendly_name": "Test cover gate",
"supported_features": 3,
"device_class": DEVICE_CLASS_GATE,
},
)
appliance = await discovery_test(device, hass)
assert appliance["endpointId"] == "cover#test_gate"
assert appliance["displayCategories"][0] == "GARAGE_DOOR"
assert appliance["friendlyName"] == "Test cover gate"
assert_endpoint_capabilities(
appliance, "Alexa.ModeController", "Alexa.EndpointHealth", "Alexa"
)
async def test_cover_position_mode(hass):
"""Test cover discovery and position using modeController."""
device = (