Support the action.devices.commands.mute intent to mute and unmute
media_players that declare support for mute/unmute.
For media players with support for volume up/down, but no support for
setting the volume to a specific number, allow use of the
action.devices.commands.relativeMute intent to control volume up/down.
This will improve support for IR blasters and other open-loop
media_player integrations.
* Don't set SUPPORT_EFFECT on DemoLight if there are no effects
This requires an update to the group test - previously the other lights
instantiated by the DemoLight component had nothing in ATTR_EFFECT_LIST, but
still had SUPPORT_EFFECT set. This appears to have resulted in the light
group test code setting an effect on the group and expecting it to apply to
all lights, but given that two of the bulbs didn't actually support any
effects (due to the empty ATTR_EFFECT_LIST) this seems like a broken
assumption and updating the test to verify only the bulb that supports
effects has had one applied seems reasonable.
* Add support for exposing light effects via Google Assistant
The LightEffects trait only supports a fixed (and small) list of lighting
effects, but we can expose them via the Modes trait - this requires saying
"Set (foo) effect to (bar)" which is a little clumsy, but at least makes it
possible.
* Support Next/Previous for InputSelector
* Update homeassistant/components/google_assistant/trait.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Adjust to match new version of _next_selected
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Use f-strings in integrations starting with F
* Use f-strings in tests for integrations starting with F
* Use f-strings in integrations starting with G
* Use f-strings in tests for integrations starting with G
* Fix pylint error
* Fix broken test
* Track if request is local
* Cancel early if 2FA disabled
* Allow disabling 2FA for ack
* Do not mark devices with 2FA as reachable
* Add request source to GA events
* Simplify media player source list
Google don't need a whitelisted set of modes anymore. So let's just forward any mode that we have.
* Report current mode with the setting name, not a synonym
* Refactor mode generation to support other modes
* Support sound mode as mode as well
* Adjust failing test now with sound modes
* Move imports to top for google_assistant
* Fix pylint error caused by isorting the imports with noqa: F401
* Move back an import because of circular dependency, add annotations
* Report unavailable entites to google.
Entities should only removed when removed from HA. Removing a temporarily unavailable entity from google causes it to need to re-configured once it become available again.
* Fix test for unavailable entities
* Make async_report_state take agent_user_id
* Attempt to store synced agents
* Drop now not needed initialization
* Make sure cloud uses the all sync on changed preferences
* Some more places to use all version of sync
* Get the agent_user_id from the request context if available
* Minor cleanup
* Remove the old fixed agent_user_id for cloud
Instead pass along cloud_user where appropriate.
* async_delay_save takes a function
* Adjust test for delayed store
* Remove unused save function
* Add login check.
* Move request sync logic into GoogleConfig
* Return http status code for request_sync same as cloud
* agent_user_id is not optional for async_sync_entities now
* No need in checking parameter here
* Adjust some things for cloud tests
* Adjust some more stuff for cloud tests
* Drop uneccessary else
* Black required change
* Let async_schedule_google_sync take agent_user_id
* Assert return value on api call
* Test old api key method
* Update homeassistant/components/google_assistant/helpers.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>