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

Enable alarmdecoder to see open/close state of bypassed RF zones when armed #18477

Merged
merged 3 commits into from
Dec 11, 2018

Conversation

jkeljo
Copy link
Contributor

@jkeljo jkeljo commented Nov 15, 2018

Description:

The alarmdecoder component already reported RF state bits as attributes. If the user knows which loop is set up for the zone in the alarm panel, they can use that information to tell whether the zone is open or closed even when the system is armed by monitoring the appropriate attribute. That’s awkward, so this commit enables the user to simply configure which loop is used and the component will update the state itself.

Related issue (if applicable): N/A

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

Example entry for configuration.yaml (if applicable):

alarmdecoder:
  # ... other alarmdecoder stuff here ...
  zones:
    01:
      name: 'Smoke Detector'
      type: 'smoke'
      rfid: '0123456'
      loop: 1

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.

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

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

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

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

@jkeljo jkeljo changed the title Enable alarmdecoder to see open/close state of bypassed zones when armed Enable alarmdecoder to see open/close state of bypassed RF zones when armed Nov 15, 2018
The alarmdecoder component already reported RF state bits as attributes. If the user knows which loop is set up for the zone in the alarm panel, they can use that information to tell whether the zone is open or closed even when the system is armed by monitoring the appropriate attribute. That’s awkward, so this commit enables the user to simply configure which loop is used and the component will update the state itself.
… than a

permanent state, since it's possible the decoder might miss some events.
@@ -7,9 +7,9 @@
import logging

from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.components.alarmdecoder import (
from ..alarmdecoder import (
Copy link
Member

Choose a reason for hiding this comment

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

Don't change the import path.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, sorry that snuck in there. I test these things by installing them as custom components in my home HA system, and absolute imports don't work in that context (if the thing being imported is also a custom component, anyway). I'll change it back.

Copy link
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.

Nice!

@MartinHjelmare MartinHjelmare merged commit eb4a445 into home-assistant:dev Dec 11, 2018
@ghost ghost removed the in progress label Dec 11, 2018
@balloob balloob mentioned this pull request Jan 10, 2019
@jkeljo jkeljo deleted the alarmdecoder branch March 10, 2019 01:29
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants