Enhancements for Security System Support (DSC) and "Tripped" State Bug Fix #135
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.
While trying to integrate my DSC PC1864 panel into HomeKit, I noticed that the Security System implementation only keeps track of a single state, duplicating the current state into the target state characteristic that's reported to HomeKit.
This causes HomeKit to be unable to determine when the panel is transitioning between states (e.g. "disarmed" to "armed"). The first commit in this PR extends the implementation to handle the current and target states independently.
I also noticed that the "tripped" state doesn't get set correctly, so the second commit in this PR addresses this issue.
These changes work for my DSC setup, but I acknowledge that my limited understanding of how the overall HKB plugin is implemented in general may mean that I've overlooked something critical for other setups. It's probably best if someone else with a DSC panel tests this on their setup before merging.