-
-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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 Control4 alarm_control_panel and binary_sensor #38703
Conversation
This makes sure the token used is always fresh
@@ -150,6 +162,8 @@ async def async_step_init(self, user_input=None): | |||
if user_input is not None: | |||
return self.async_create_entry(title="", data=user_input) | |||
|
|||
# TODO: figure out how to accept empty strings to disable modes |
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 need some help here:
I want users to be able to disable alarm modes that they don't use/aren't supported by their Control4 alarm by leaving the option field blank, but I can't figure out how to get voluptuous
to accept a blank input as None
.
This is not as important, but would it be a good idea to hide alarm options if there is no alarm_control_panel
entity discovered? How would I do that?
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.
You can't use default=
if you want to allow blank input. You can use description={"suggested_value": <the value>}
instead
@@ -0,0 +1,177 @@ | |||
"""Platform for Control4 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.
You should only add one platform per PR
async def async_update_data(): | ||
"""Fetch data from Control4 director for alarm control panels.""" | ||
try: | ||
return await director_update_data(hass, entry, CONTROL4_SENSOR_VAR) |
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.
Would it make sense to use just one updated and add CONTROL4_SENSOR_VAR
to the list of vars?
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Converted to draft until I can find the time to finish this. |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Proposed change
This adds alarm_control_panel and binary_sensor platforms to the Control4 integration.
These two are in the same PR because the binary_sensors are for representing the states of alarm zones (windows, doors, motion, etc.)
Type of change
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: