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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add device trigger for alarm_control_panel #29068

Merged

Conversation

@springstan
Copy link
Member

springstan commented Nov 25, 2019

Breaking Change:

Description:

  • added basic triggers to alarm control panel

Related issue (if applicable): fixes #27010

Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

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. Update and include derived files by running python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.
@probot-home-assistant

This comment has been minimized.

Copy link

probot-home-assistant bot commented Nov 25, 2019

Hey there @colinodell, mind taking a look at this pull request as its been labeled with a integration (alarm_control_panel) you are listed as a codeowner for? Thanks!

@MartinHjelmare MartinHjelmare added this to Review in progress in Dev Nov 26, 2019
springstan added 4 commits Nov 26, 2019
…into add-device-trigger-alarm-control-panel
to_state = STATE_ALARM_ARMED_AWAY
elif config[CONF_TYPE] == "armed_night":
from_state = STATE_ALARM_PENDING
to_state = STATE_ALARM_ARMED_NIGHT

This comment has been minimized.

Copy link
@springstan

springstan Nov 28, 2019

Author Member

Is the from_state required in this example? :)
I was not quite sure but I attempted to implemented everything from the docs.

This comment has been minimized.

Copy link
@balloob

balloob Dec 1, 2019

Member

from state is important because else it will trigger if it goes from armed_night -> armed_night when an attribute changes.

This comment has been minimized.

Copy link
@springstan

springstan Dec 1, 2019

Author Member

That would be really bad 😁 thanks for reviewing and merging my PR!

@springstan springstan changed the title Add device trigger to alarm control panel Add device trigger for alarm_control_panel Nov 29, 2019
@springstan springstan requested a review from balloob Nov 29, 2019
Dev automation moved this from Review in progress to Reviewer approved Dec 1, 2019
@balloob
balloob approved these changes Dec 1, 2019
@balloob balloob merged commit 8908dba into home-assistant:dev Dec 1, 2019
11 checks passed
11 checks passed
CI #20191128.35 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview CheckFormat) Overview CheckFormat succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
Details
cla-bot Everyone involved has signed the CLA
codecov/patch 96% of diff hit (target 94.49%)
Details
codecov/project 94.43% (target 90%)
Details
Dev automation moved this from Reviewer approved to Done Dec 1, 2019
@lock lock bot locked and limited conversation to collaborators Dec 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
3 participants
You can’t perform that action at this time.