Add support for Mode trait in Google Assistant.#18772
Add support for Mode trait in Google Assistant.#18772balloob merged 5 commits intohome-assistant:devfrom marchingphoenix:GoogleAssistant-Expose-Media-Player-Sources
Conversation
michaelarnauts
left a comment
There was a problem hiding this comment.
There are still a few duplicates or comma's.
|
Nice! 🎉 |
|
Does this mean that Home Assistant will soon support controlling my Bluesound media player with Google Assistant, which does not work right now? |
|
I never had issues turning on and off my receiver during testing. |
That makes sense to me, since you would not want to turn your Bluesound media player on/off, you would want to make it play/pause. Might there be a way to turn the Google Assistant command “turn media player on/off” into the HA service call “media_player.media_play/media_player.media_pause”? |
|
This is a bit off topic for this pr. Any change would affect all media_players, I'm not sure if that's something we'd want to do. Might be able to reverse engineer what GA does for chromecasts. |
|
Wouldn't it be both possible and relevant to make the module ask (sorry for my layman language, I have no idea about the technical side of this): "Does this media player support on/off?" "No." "Okay, I'll sent play/pause commands instead"? |
|
Or would it be possible with the mode trait supported to enable a command like "set media player to play" and "set media player to pause"? |
|
No discussion in merged PRs. |
Description:
Add support for Modes Trait for Google Assistant.
Requires a pre-defined set of definitions for "settings"
https://developers.google.com/actions/reference/smarthome/traits/modes
Code will try to match media_player sources to available settings and present them to Google Assistant.
Modes are currently only supported by media_players but the structure is there to support other device TYPES as needed.
Related issue (if applicable):
Relates to feature request here:
https://community.home-assistant.io/t/control-denon-receivers-via-google-assistant/80126
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#7683
Example entry for
configuration.yaml(if applicable):No changes.
Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragercNot applicable..
If the code does not interact with devices: