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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add alarm control panel support to ZHA #49080
Add alarm control panel support to ZHA #49080
Conversation
Hey there @Adminiuga, mind taking a look at this pull request as its been labeled with an integration ( |
Awesome! I'm in the process of doing this for deCONZ (#48736) as well, should we perhaps have a chat? |
f70db9d
to
696e66d
Compare
55d9af4
to
dd414c6
Compare
Does the ZHA integration documentation need to be updated so it also lists alarm control panels and/or IAS ACE device types? There is currently support for the following device types within Home Assistant:
Also need to add "Alarm" to https://www.home-assistant.io/integrations/#alarm
|
Yes |
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.
LGTM
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 address the comments in a new PR. Thanks!
return IAS_ACE_STATE_MAP.get(self._channel.armed_state) | ||
|
||
@property | ||
def state_attributes(self): |
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 should be extra_state_attributes
.
state_attr = { | ||
ATTR_CODE_FORMAT: self.code_format, | ||
ATTR_CHANGED_BY: self.changed_by, | ||
ATTR_CODE_ARM_REQUIRED: self.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.
These attributes are already handled by the base alarm control panel entity class. It's enough to implement the corresponding properties.
Will do. Thanks for the review! |
Proposed change
This PR adds support for alarm control panel via Zigbee keypads to the ZHA integration.
alarm.mov
Things left to do:
Type of change
Example entry for
configuration.yaml
:# Example configuration.yaml
Additional information
Checklist
black --fast 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
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: