Improve unpair schema in homekit#150235
Merged
bdraco merged 2 commits intoSep 1, 2025
Merged
Conversation
Contributor
|
Hey there @bdraco, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Contributor
There was a problem hiding this comment.
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 |
19 tasks
NoRi2909
reviewed
Aug 8, 2025
joostlek
reviewed
Aug 11, 2025
Member
|
Tagged this for the current beta, nice little QoL. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Proposed change
Improve
UNPAIR_SERVICE_SCHEMAin homekit.As this service required just devices, using
ENTITY_SERVICE_FIELDSwas 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: