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 testpull/73744/head
parent
3571a80c8d
commit
c075760ca0
|
@ -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,
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue