1
mirror of https://github.com/home-assistant/core synced 2024-07-18 12:02:20 +02:00

Display Windows as TYPE_WINDOW in Google Home (#73533)

* Display Windows as TYPE_WINDOW in Google Home

* set window type to window in smart_home test
This commit is contained in:
w-marco 2022-06-20 13:03:43 +02:00 committed by GitHub
parent 3571a80c8d
commit c075760ca0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -86,6 +86,7 @@ TYPE_SPEAKER = f"{PREFIX_TYPES}SPEAKER"
TYPE_SWITCH = f"{PREFIX_TYPES}SWITCH"
TYPE_THERMOSTAT = f"{PREFIX_TYPES}THERMOSTAT"
TYPE_TV = f"{PREFIX_TYPES}TV"
TYPE_WINDOW = f"{PREFIX_TYPES}WINDOW"
TYPE_VACUUM = f"{PREFIX_TYPES}VACUUM"
SERVICE_REQUEST_SYNC = "request_sync"
@ -147,7 +148,7 @@ DEVICE_CLASS_TO_GOOGLE_TYPES = {
(binary_sensor.DOMAIN, binary_sensor.BinarySensorDeviceClass.DOOR): TYPE_DOOR,
(binary_sensor.DOMAIN, binary_sensor.BinarySensorDeviceClass.LOCK): TYPE_SENSOR,
(binary_sensor.DOMAIN, binary_sensor.BinarySensorDeviceClass.OPENING): TYPE_SENSOR,
(binary_sensor.DOMAIN, binary_sensor.BinarySensorDeviceClass.WINDOW): TYPE_SENSOR,
(binary_sensor.DOMAIN, binary_sensor.BinarySensorDeviceClass.WINDOW): TYPE_WINDOW,
(
binary_sensor.DOMAIN,
binary_sensor.BinarySensorDeviceClass.GARAGE_DOOR,

View File

@ -1026,7 +1026,7 @@ async def test_device_class_switch(hass, device_class, google_type):
("garage_door", "action.devices.types.GARAGE"),
("lock", "action.devices.types.SENSOR"),
("opening", "action.devices.types.SENSOR"),
("window", "action.devices.types.SENSOR"),
("window", "action.devices.types.WINDOW"),
],
)
async def test_device_class_binary_sensor(hass, device_class, google_type):