-
-
Notifications
You must be signed in to change notification settings - Fork 29k
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
Fixed HomeKit security system's arming state mismatch #108863
Fixed HomeKit security system's arming state mismatch #108863
Conversation
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 seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
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.
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
if (target_state := HASS_TO_HOMEKIT_TARGET.get(hass_state)) is not None: | ||
|
||
if hass_state == STATE_ALARM_ARMING: | ||
if (hass_next_state := new_state.attributes.get("next_state")) is not None: |
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.
next_state
is only defined by manual.alarm_control_panel
. We can only use attributes that are defined by the base entity class here as it won't work with any other integration
https://developers.home-assistant.io/docs/core/entity/alarm-control-panel/
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.
Please see above
https://github.com/home-assistant/core/pull/108863/files#r1466780148
Understood. I am going to close this while I search for a better solution. Thank you for your help! |
Proposed change
This resolves an issue where HASS is passing an incorrect state for security systems in HomeKit. Currently, during a security system arming event initiated in either HomeKit or HASS, HASS maps this arming state to a 'armed away' state and then uses that for the targeted state in HomeKit (because HomeKit doesn't actually have an 'arming state' support). From a UI perspective, it causes the slider to move to the 'Away' selection during arming regardless of what type of 'arming to' state was chosen. This can be very confusing, and my initial encounter I thought I had chosen the wrong selection.
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: