Add device classes for media player and map to google types (#23236)
* Add device classes for media player and map to google types * Switch default class for media_player to media
This commit is contained in:
1 parent
7e8f2d72b6
commit
39932d132d
5 files changed
+68
-6
No files matched your search
@@ -51,6 +51,9 @@ TYPE_GARAGE = PREFIX_TYPES + 'GARAGE'
|
||||
TYPE_OUTLET = PREFIX_TYPES + 'OUTLET'
|
||||
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/'
|
||||
@@ -86,7 +89,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_MEDIA,
|
||||
scene.DOMAIN: TYPE_SCENE,
|
||||
script.DOMAIN: TYPE_SCENE,
|
||||
switch.DOMAIN: TYPE_SWITCH,
|
||||
@@ -104,6 +107,8 @@ DEVICE_CLASS_TO_GOOGLE_TYPES = {
|
||||
(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_WINDOW): TYPE_SENSOR,
|
||||
(media_player.DOMAIN, media_player.DEVICE_CLASS_TV): TYPE_TV,
|
||||
(media_player.DOMAIN, media_player.DEVICE_CLASS_SPEAKER): TYPE_SPEAKER,
|
||||
}
|
||||
|
||||
CHALLENGE_ACK_NEEDED = 'ackNeeded'
|
||||
|
||||
Reference in new issue
Block a user