From 877efc993b5621aca5e089adb52b51e742a9c649 Mon Sep 17 00:00:00 2001 From: Barry Loong Date: Mon, 13 Mar 2023 10:45:25 +0800 Subject: [PATCH] Add support for window device class to google assistant (#89564) --- homeassistant/components/google_assistant/const.py | 1 + tests/components/google_assistant/test_smart_home.py | 1 + 2 files changed, 2 insertions(+) diff --git a/homeassistant/components/google_assistant/const.py b/homeassistant/components/google_assistant/const.py index 20c4ab60e88..bf511f8eaeb 100644 --- a/homeassistant/components/google_assistant/const.py +++ b/homeassistant/components/google_assistant/const.py @@ -161,6 +161,7 @@ DEVICE_CLASS_TO_GOOGLE_TYPES = { (cover.DOMAIN, cover.CoverDeviceClass.GARAGE): TYPE_GARAGE, (cover.DOMAIN, cover.CoverDeviceClass.GATE): TYPE_GARAGE, (cover.DOMAIN, cover.CoverDeviceClass.SHUTTER): TYPE_SHUTTER, + (cover.DOMAIN, cover.CoverDeviceClass.WINDOW): TYPE_WINDOW, ( humidifier.DOMAIN, humidifier.HumidifierDeviceClass.DEHUMIDIFIER, diff --git a/tests/components/google_assistant/test_smart_home.py b/tests/components/google_assistant/test_smart_home.py index cf83e47b3bf..d0a7df5a863 100644 --- a/tests/components/google_assistant/test_smart_home.py +++ b/tests/components/google_assistant/test_smart_home.py @@ -1113,6 +1113,7 @@ async def test_device_class_binary_sensor( ("awning", "action.devices.types.AWNING"), ("shutter", "action.devices.types.SHUTTER"), ("curtain", "action.devices.types.CURTAIN"), + ("window", "action.devices.types.WINDOW"), ], ) async def test_device_class_cover(