Update the way AccessoryInformationService is merged #2472
Merged
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.
The definition of the AccessoryInformationService changed lately:
https://github.com/KhaosT/HAP-NodeJS/blob/a3a49491c00e91ffb2a6dd4d3628e917cf61ddba/src/lib/gen/HomeKit.ts#L3651-L3664
This change makes the whole process a bit more future proof.
Currently pretty much all Characteristics are READ only and are meant to not change over the time, except of
ConfiguredName
(READ, WRITE, NOTIFY) andProductData
(READ, NOTIFY).I would guess that ConfiguredName could be used to listen for any name changes done inside the Home App.
What the PR does not cover currently is, that event handlers are transferred as well (only really useful for those mentioned services). Don't know what would be the best practice for that.