Skip to content
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

Closed
wants to merge 28 commits into from

Conversation

lawtancool
Copy link
Contributor

@lawtancool lawtancool commented Aug 10, 2020

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

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 馃 Silver
  • 馃 Gold
  • 馃弳 Platinum

@@ -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
Copy link
Contributor Author

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?

Copy link
Contributor

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

@MartinHjelmare MartinHjelmare added this to By Code Owner in Dev Aug 16, 2020
@@ -0,0 +1,177 @@
"""Platform for Control4 Alarm Control Panel."""
Copy link
Contributor

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)
Copy link
Contributor

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?

@stale
Copy link

stale bot commented Oct 12, 2020

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.
Thank you for your contributions.

@stale stale bot added the stale label Oct 12, 2020
@lawtancool lawtancool marked this pull request as draft October 12, 2020 00:21
@stale stale bot removed the stale label Oct 12, 2020
@lawtancool
Copy link
Contributor Author

Converted to draft until I can find the time to finish this.

@MartinHjelmare MartinHjelmare moved this from By Code Owner to Incoming in Dev Dec 7, 2020
@github-actions
Copy link

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.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Jan 28, 2021
@github-actions github-actions bot closed this Feb 4, 2021
Dev automation moved this from Incoming to Cancelled Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Dev
  
Cancelled
Development

Successfully merging this pull request may close these issues.

None yet

3 participants