Switch default media_player device class to settop for google assistant (#36003)
This commit is contained in:
parent
879e2d1afd
commit
ad6e21182e
3 changed files with 7 additions and 6 deletions
|
@ -73,6 +73,7 @@ TYPE_DOOR = f"{PREFIX_TYPES}DOOR"
|
|||
TYPE_TV = f"{PREFIX_TYPES}TV"
|
||||
TYPE_SPEAKER = f"{PREFIX_TYPES}SPEAKER"
|
||||
TYPE_ALARM = f"{PREFIX_TYPES}SECURITYSYSTEM"
|
||||
TYPE_SETTOP = f"{PREFIX_TYPES}SETTOP"
|
||||
|
||||
SERVICE_REQUEST_SYNC = "request_sync"
|
||||
HOMEGRAPH_URL = "https://homegraph.googleapis.com/"
|
||||
|
@ -114,7 +115,7 @@ DOMAIN_TO_GOOGLE_TYPES = {
|
|||
input_boolean.DOMAIN: TYPE_SWITCH,
|
||||
light.DOMAIN: TYPE_LIGHT,
|
||||
lock.DOMAIN: TYPE_LOCK,
|
||||
media_player.DOMAIN: TYPE_SWITCH,
|
||||
media_player.DOMAIN: TYPE_SETTOP,
|
||||
scene.DOMAIN: TYPE_SCENE,
|
||||
script.DOMAIN: TYPE_SCENE,
|
||||
switch.DOMAIN: TYPE_SWITCH,
|
||||
|
|
|
@ -168,7 +168,7 @@ DEMO_DEVICES = [
|
|||
"action.devices.traits.Volume",
|
||||
"action.devices.traits.Modes",
|
||||
],
|
||||
"type": "action.devices.types.SWITCH",
|
||||
"type": "action.devices.types.SETTOP",
|
||||
"willReportState": False,
|
||||
},
|
||||
{
|
||||
|
@ -179,14 +179,14 @@ DEMO_DEVICES = [
|
|||
"action.devices.traits.Volume",
|
||||
"action.devices.traits.Modes",
|
||||
],
|
||||
"type": "action.devices.types.SWITCH",
|
||||
"type": "action.devices.types.SETTOP",
|
||||
"willReportState": False,
|
||||
},
|
||||
{
|
||||
"id": "media_player.lounge_room",
|
||||
"name": {"name": "Lounge room"},
|
||||
"traits": ["action.devices.traits.OnOff", "action.devices.traits.Modes"],
|
||||
"type": "action.devices.types.SWITCH",
|
||||
"type": "action.devices.types.SETTOP",
|
||||
"willReportState": False,
|
||||
},
|
||||
{
|
||||
|
@ -197,7 +197,7 @@ DEMO_DEVICES = [
|
|||
"action.devices.traits.Volume",
|
||||
"action.devices.traits.Modes",
|
||||
],
|
||||
"type": "action.devices.types.SWITCH",
|
||||
"type": "action.devices.types.SETTOP",
|
||||
"willReportState": False,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -743,7 +743,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.SWITCH"),
|
||||
("non_existing_class", "action.devices.types.SETTOP"),
|
||||
("tv", "action.devices.types.TV"),
|
||||
],
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue