diff --git a/homeassistant/components/google_assistant/const.py b/homeassistant/components/google_assistant/const.py index 0f15d10f181..92afe90a5ac 100644 --- a/homeassistant/components/google_assistant/const.py +++ b/homeassistant/components/google_assistant/const.py @@ -53,7 +53,6 @@ TYPE_SENSOR = PREFIX_TYPES + 'SENSOR' TYPE_DOOR = PREFIX_TYPES + 'DOOR' TYPE_TV = PREFIX_TYPES + 'TV' TYPE_SPEAKER = PREFIX_TYPES + 'SPEAKER' -TYPE_MEDIA = PREFIX_TYPES + 'MEDIA' SERVICE_REQUEST_SYNC = 'request_sync' HOMEGRAPH_URL = 'https://homegraph.googleapis.com/' @@ -89,7 +88,7 @@ DOMAIN_TO_GOOGLE_TYPES = { input_boolean.DOMAIN: TYPE_SWITCH, light.DOMAIN: TYPE_LIGHT, lock.DOMAIN: TYPE_LOCK, - media_player.DOMAIN: TYPE_MEDIA, + media_player.DOMAIN: TYPE_SWITCH, scene.DOMAIN: TYPE_SCENE, script.DOMAIN: TYPE_SCENE, switch.DOMAIN: TYPE_SWITCH, diff --git a/tests/components/google_assistant/__init__.py b/tests/components/google_assistant/__init__.py index 76ccc79a378..f3732c12213 100644 --- a/tests/components/google_assistant/__init__.py +++ b/tests/components/google_assistant/__init__.py @@ -147,7 +147,7 @@ DEMO_DEVICES = [{ 'action.devices.traits.Modes' ], 'type': - 'action.devices.types.MEDIA', + 'action.devices.types.SWITCH', 'willReportState': False }, { @@ -162,7 +162,7 @@ DEMO_DEVICES = [{ 'action.devices.traits.Modes' ], 'type': - 'action.devices.types.MEDIA', + 'action.devices.types.SWITCH', 'willReportState': False }, { @@ -171,7 +171,7 @@ DEMO_DEVICES = [{ 'name': 'Lounge room' }, 'traits': ['action.devices.traits.OnOff', 'action.devices.traits.Modes'], - 'type': 'action.devices.types.MEDIA', + 'type': 'action.devices.types.SWITCH', 'willReportState': False }, { 'id': @@ -182,7 +182,7 @@ DEMO_DEVICES = [{ 'traits': ['action.devices.traits.OnOff', 'action.devices.traits.Volume'], 'type': - 'action.devices.types.MEDIA', + 'action.devices.types.SWITCH', 'willReportState': False }, { diff --git a/tests/components/google_assistant/test_smart_home.py b/tests/components/google_assistant/test_smart_home.py index ea5291f28f7..519a55fbc00 100644 --- a/tests/components/google_assistant/test_smart_home.py +++ b/tests/components/google_assistant/test_smart_home.py @@ -686,7 +686,7 @@ async def test_device_class_cover(hass, device_class, google_type): @pytest.mark.parametrize("device_class,google_type", [ - ('non_existing_class', 'action.devices.types.MEDIA'), + ('non_existing_class', 'action.devices.types.SWITCH'), ('speaker', 'action.devices.types.SPEAKER'), ('tv', 'action.devices.types.TV'), ])