-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
Improve unpair schema in homekit #150235
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
Improve unpair schema in homekit #150235
Conversation
Hey there @bdraco, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
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.
Pull Request Overview
This PR improves the HomeKit unpair service schema by simplifying the validation and adding proper field documentation. The changes make the device_id parameter explicitly required and provide user-friendly descriptions for the service and its fields.
Key changes:
- Simplified the unpair service schema validation to directly require device_id as a string
- Added proper field documentation in strings.json for the device_id parameter
- Updated services.yaml to use fields instead of target with proper device selector
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
homeassistant/components/homekit/__init__.py |
Simplified UNPAIR_SERVICE_SCHEMA to directly require device_id as string instead of using complex entity service validation |
homeassistant/components/homekit/services.yaml |
Changed from target-based to fields-based schema with required device_id and device selector |
homeassistant/components/homekit/strings.json |
Added field documentation for device_id parameter in the unpair service |
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.
Tagged this for the current beta, nice little QoL. |
Proposed change
Improve
UNPAIR_SERVICE_SCHEMA
in homekit.As this service required just devices, using
ENTITY_SERVICE_FIELDS
was unnecessarily complex. Additionally a device selector provides a better UI here than target selector.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
.To help with the load of incoming pull requests: