mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Device type garage for binary sensor garage_door (#23345)
* Switch binary sensor to garage for garage_door * Add test for cover garage device type
This commit is contained in:
parent
843bad83fa
commit
62fcb1895e
@ -100,7 +100,7 @@ DEVICE_CLASS_TO_GOOGLE_TYPES = {
|
|||||||
(switch.DOMAIN, switch.DEVICE_CLASS_OUTLET): TYPE_OUTLET,
|
(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_DOOR): TYPE_DOOR,
|
||||||
(binary_sensor.DOMAIN, binary_sensor.DEVICE_CLASS_GARAGE_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_LOCK): TYPE_SENSOR,
|
||||||
(binary_sensor.DOMAIN, binary_sensor.DEVICE_CLASS_OPENING): TYPE_SENSOR,
|
(binary_sensor.DOMAIN, binary_sensor.DEVICE_CLASS_OPENING): TYPE_SENSOR,
|
||||||
(binary_sensor.DOMAIN, binary_sensor.DEVICE_CLASS_WINDOW): TYPE_SENSOR,
|
(binary_sensor.DOMAIN, binary_sensor.DEVICE_CLASS_WINDOW): TYPE_SENSOR,
|
||||||
|
@ -602,7 +602,7 @@ async def test_device_class_switch(hass, device_class, google_type):
|
|||||||
|
|
||||||
@pytest.mark.parametrize("device_class,google_type", [
|
@pytest.mark.parametrize("device_class,google_type", [
|
||||||
('door', 'action.devices.types.DOOR'),
|
('door', 'action.devices.types.DOOR'),
|
||||||
('garage_door', 'action.devices.types.SENSOR'),
|
('garage_door', 'action.devices.types.GARAGE'),
|
||||||
('lock', 'action.devices.types.SENSOR'),
|
('lock', 'action.devices.types.SENSOR'),
|
||||||
('opening', 'action.devices.types.SENSOR'),
|
('opening', 'action.devices.types.SENSOR'),
|
||||||
('window', '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", [
|
@pytest.mark.parametrize("device_class,google_type", [
|
||||||
('non_existing_class', 'action.devices.types.BLINDS'),
|
('non_existing_class', 'action.devices.types.BLINDS'),
|
||||||
('door', 'action.devices.types.DOOR'),
|
('door', 'action.devices.types.DOOR'),
|
||||||
|
('garage', 'action.devices.types.GARAGE'),
|
||||||
])
|
])
|
||||||
async def test_device_class_cover(hass, device_class, google_type):
|
async def test_device_class_cover(hass, device_class, google_type):
|
||||||
"""Test that a binary entity syncs to the correct device type."""
|
"""Test that a binary entity syncs to the correct device type."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user