diff --git a/homeassistant/components/google_assistant/const.py b/homeassistant/components/google_assistant/const.py index 1bab27bdd12..b6f57546cec 100644 --- a/homeassistant/components/google_assistant/const.py +++ b/homeassistant/components/google_assistant/const.py @@ -100,7 +100,7 @@ DEVICE_CLASS_TO_GOOGLE_TYPES = { (switch.DOMAIN, switch.DEVICE_CLASS_OUTLET): TYPE_OUTLET, (binary_sensor.DOMAIN, binary_sensor.DEVICE_CLASS_DOOR): TYPE_DOOR, (binary_sensor.DOMAIN, binary_sensor.DEVICE_CLASS_GARAGE_DOOR): - TYPE_SENSOR, + TYPE_GARAGE, (binary_sensor.DOMAIN, binary_sensor.DEVICE_CLASS_LOCK): TYPE_SENSOR, (binary_sensor.DOMAIN, binary_sensor.DEVICE_CLASS_OPENING): TYPE_SENSOR, (binary_sensor.DOMAIN, binary_sensor.DEVICE_CLASS_WINDOW): TYPE_SENSOR, diff --git a/tests/components/google_assistant/test_smart_home.py b/tests/components/google_assistant/test_smart_home.py index 375f647da22..ce750b74e23 100644 --- a/tests/components/google_assistant/test_smart_home.py +++ b/tests/components/google_assistant/test_smart_home.py @@ -602,7 +602,7 @@ async def test_device_class_switch(hass, device_class, google_type): @pytest.mark.parametrize("device_class,google_type", [ ('door', 'action.devices.types.DOOR'), - ('garage_door', 'action.devices.types.SENSOR'), + ('garage_door', 'action.devices.types.GARAGE'), ('lock', 'action.devices.types.SENSOR'), ('opening', 'action.devices.types.SENSOR'), ('window', 'action.devices.types.SENSOR'), @@ -646,6 +646,7 @@ async def test_device_class_binary_sensor(hass, device_class, google_type): @pytest.mark.parametrize("device_class,google_type", [ ('non_existing_class', 'action.devices.types.BLINDS'), ('door', 'action.devices.types.DOOR'), + ('garage', 'action.devices.types.GARAGE'), ]) async def test_device_class_cover(hass, device_class, google_type): """Test that a binary entity syncs to the correct device type."""