Switch media player to SWITCH type (#23914)
MEDIA device type is being rejected by google now.pull/23932/head
parent
8d2a784831
commit
6030e419c5
|
@ -53,7 +53,6 @@ TYPE_SENSOR = PREFIX_TYPES + 'SENSOR'
|
|||
TYPE_DOOR = PREFIX_TYPES + 'DOOR'
|
||||
TYPE_TV = PREFIX_TYPES + 'TV'
|
||||
TYPE_SPEAKER = PREFIX_TYPES + 'SPEAKER'
|
||||
TYPE_MEDIA = PREFIX_TYPES + 'MEDIA'
|
||||
|
||||
SERVICE_REQUEST_SYNC = 'request_sync'
|
||||
HOMEGRAPH_URL = 'https://homegraph.googleapis.com/'
|
||||
|
@ -89,7 +88,7 @@ DOMAIN_TO_GOOGLE_TYPES = {
|
|||
input_boolean.DOMAIN: TYPE_SWITCH,
|
||||
light.DOMAIN: TYPE_LIGHT,
|
||||
lock.DOMAIN: TYPE_LOCK,
|
||||
media_player.DOMAIN: TYPE_MEDIA,
|
||||
media_player.DOMAIN: TYPE_SWITCH,
|
||||
scene.DOMAIN: TYPE_SCENE,
|
||||
script.DOMAIN: TYPE_SCENE,
|
||||
switch.DOMAIN: TYPE_SWITCH,
|
||||
|
|
|
@ -147,7 +147,7 @@ DEMO_DEVICES = [{
|
|||
'action.devices.traits.Modes'
|
||||
],
|
||||
'type':
|
||||
'action.devices.types.MEDIA',
|
||||
'action.devices.types.SWITCH',
|
||||
'willReportState':
|
||||
False
|
||||
}, {
|
||||
|
@ -162,7 +162,7 @@ DEMO_DEVICES = [{
|
|||
'action.devices.traits.Modes'
|
||||
],
|
||||
'type':
|
||||
'action.devices.types.MEDIA',
|
||||
'action.devices.types.SWITCH',
|
||||
'willReportState':
|
||||
False
|
||||
}, {
|
||||
|
@ -171,7 +171,7 @@ DEMO_DEVICES = [{
|
|||
'name': 'Lounge room'
|
||||
},
|
||||
'traits': ['action.devices.traits.OnOff', 'action.devices.traits.Modes'],
|
||||
'type': 'action.devices.types.MEDIA',
|
||||
'type': 'action.devices.types.SWITCH',
|
||||
'willReportState': False
|
||||
}, {
|
||||
'id':
|
||||
|
@ -182,7 +182,7 @@ DEMO_DEVICES = [{
|
|||
'traits':
|
||||
['action.devices.traits.OnOff', 'action.devices.traits.Volume'],
|
||||
'type':
|
||||
'action.devices.types.MEDIA',
|
||||
'action.devices.types.SWITCH',
|
||||
'willReportState':
|
||||
False
|
||||
}, {
|
||||
|
|
|
@ -686,7 +686,7 @@ async def test_device_class_cover(hass, device_class, google_type):
|
|||
|
||||
|
||||
@pytest.mark.parametrize("device_class,google_type", [
|
||||
('non_existing_class', 'action.devices.types.MEDIA'),
|
||||
('non_existing_class', 'action.devices.types.SWITCH'),
|
||||
('speaker', 'action.devices.types.SPEAKER'),
|
||||
('tv', 'action.devices.types.TV'),
|
||||
])
|
||||
|
|
Loading…
Reference in New Issue