-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intent target matching and media player enhancements #115445
Conversation
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
@@ -41,10 +43,88 @@ async def async_setup_intents(hass: HomeAssistant) -> None: | |||
INTENT_SET_VOLUME, | |||
DOMAIN, | |||
SERVICE_VOLUME_SET, | |||
extra_slots={ | |||
required_domains={DOMAIN}, | |||
required_states={MediaPlayerState.PLAYING}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is preferred, but is this required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's required in the "multiple targets" case (according to the spec, at least). I didn't differentiate between the single and multiple target cases in this PR, and I'm not convinced we should in general. It's now always clear when there will be a single target, so I went with a more conservative approach to start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Couple of comments.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Breaking changes
The
HassLightSet
intent no longer checks if the targeted lights support setting brightness before turning them on. This behavior now matches thelight.turn_on
service.Proposed change
Extends the target matching capabilities in the intent helper to include:
Media players intents have been updated to take advantage of the extended target matching.
Additionally:
Some missing pieces for later PRs:
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: