-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
Add SecurityPanelController for alarm_control_panel to alexa #27081
Add SecurityPanelController for alarm_control_panel to alexa #27081
Conversation
Thank you for your contribution thus far! 🎖 Since this is a significant contribution, we would appreciate you'd added yourself to the list of code owners for this integration. ❤️ Please, add your GitHub username to the For more information about "code owners", see: Architecture Decision Record 0008: Code owners. |
@ochlocracy run |
68b1c7f
to
cb9530d
Compare
|
||
def properties_proactively_reported(self): | ||
"""Return True if properties asynchronously reported.""" | ||
return True |
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.
For another PR, but I realize that we should probably make this return alexa_config.should_report_state
. Not everyone could have state reporting enabled.
|
||
def interfaces(self): | ||
"""Yield the supported interfaces.""" | ||
if not self.entity.attributes.get("code_arm_required"): |
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.
I wonder if we could still expose it even if this is required, but have arming it fail. That way users could still ask if their security panel is armed.
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.
This is great! Both comments can be addressed in a future PR. Awesome job! 🐬 🎉
This can be merged once merge conflicts resolved |
0e543bf
to
ebed412
Compare
Resolved conflicts. There are some changes to alarm_control_panel that could be made to integrate this better overall, and resolve your comments. I'll start looking into that, and issue a PR. |
Description:
Implements the Alexa.SecurityPanelController for alarm_control_panel to alexa. This will expose entities in the alarm_control_panel domain during alexa discovery.
Utterances:
Caveats to consider:
code_format
attribute is set toFORMAT_NUMBER
The Alexa app will offer the ability to use the existing code. Otherwise user must configure a voice PIN in the Alexa app.code
attribute is a private property depending on supported integrations, therefore it can not be validated against the PIN provided in the Alexa API request. The PIN provided in the API request will be passed directly to thealarm_disarm
service.UNAUTHORIZED
PIN code failure.FOUR_DIGIT_PIN
.alarm_control_panel
state must bedisarmed
before arming. User can not change from one armed state to another armed state per Alexa API guidelines.code_arm_required
is set the entity will not be exposed during discovery.armed_custom_bypass
isn't supported by Alexa API and assumedarmed_home
Related issue (if applicable):
Checks off part of #24579
Example entry for
configuration.yaml
:Will include all entities in the alarm_control_panel domain during discovery, depending on filtering.
Checklist:
Tested with
alarmdotcom
andmanual
alarm_control_panel
, using custom smart home skill, with haaska.tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
Will provide if needed.
If the code does not interact with devices: