Skip to content

Template alarm panel#30487

Merged
MartinHjelmare merged 5 commits into
home-assistant:devfrom
alistairg:template-alarm-panel
Jan 9, 2020
Merged

Template alarm panel#30487
MartinHjelmare merged 5 commits into
home-assistant:devfrom
alistairg:template-alarm-panel

Conversation

@alistairg
Copy link
Copy Markdown
Contributor

@alistairg alistairg commented Jan 4, 2020

Description:

Adding support for template alarm panel. Resurrecting PR #24997, with changes suggested by @MartinHjelmare incorporated.

Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#9801

Example entry for configuration.yaml (if applicable):

alarm_control_panel:
  - platform: template
    panels:
      alarmdecoder:
        friendly_name: "Virtual Alarm Panel"
        code_arm_required: false
        value_template: "{{ states('alarm_control_panel.alarm_panel') }}"
        disarm:
          service: alarm_control_panel.alarm_disarm
          data:
            entity_id: alarm_control_panel.alarm_panel
            code: !secret alarm_code
        arm_away:
          service: alarm_control_panel.alarm_arm_away
          data:
            entity_id: alarm_control_panel.alarm_panel
            code: !secret alarm_code
        arm_home:
          service: alarm_control_panel.alarm_arm_home
          data:
            entity_id: alarm_control_panel.alarm_panel
            code: !secret alarm_code
        arm_night:
          service: alarm_control_panel.alarm_arm_night
          data:
            entity_id: alarm_control_panel.alarm_panel
            code: !secret alarm_code

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 does not interact with devices:

  • Tests have been added to verify that the new code works.

@probot-home-assistant
Copy link
Copy Markdown

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

Comment thread tests/components/template/test_alarm_control_panel.py Outdated
Comment thread tests/components/template/test_alarm_control_panel.py Outdated
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just some clean up.

Comment thread homeassistant/components/template/alarm_control_panel.py Outdated
Comment thread homeassistant/components/template/alarm_control_panel.py Outdated
Comment thread homeassistant/components/template/alarm_control_panel.py Outdated
Comment thread homeassistant/components/template/alarm_control_panel.py Outdated
Comment thread tests/components/template/test_alarm_control_panel.py Outdated
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@MartinHjelmare MartinHjelmare merged commit fe0b537 into home-assistant:dev Jan 9, 2020
@lock lock Bot locked and limited conversation to collaborators Jan 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants