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

Projects
None yet
4 participants
@jkeljo
Copy link
Contributor

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

@jkeljo jkeljo force-pushed the jkeljo:alarmdecoder branch from d843a25 to 864dc8a Nov 15, 2018

@jkeljo jkeljo referenced this pull request Nov 15, 2018

Merged

Alarmdecoder doc updates for new zone loop parameter #7513

2 of 2 tasks complete
Enable alarmdecoder to see open/close state of bypassed zones when armed
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.

@jkeljo jkeljo force-pushed the jkeljo:alarmdecoder branch from 864dc8a to b9dbc3d Nov 16, 2018

Simplify, also it's more correct to treat it as a state change rather…
… 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 (

This comment has been minimized.

@MartinHjelmare

MartinHjelmare Dec 9, 2018

Member

Don't change the import path.

This comment has been minimized.

@jkeljo

jkeljo Dec 11, 2018

Contributor

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.

@MartinHjelmare
Copy link
Member

MartinHjelmare left a comment

Nice!

@MartinHjelmare MartinHjelmare merged commit eb4a445 into home-assistant:dev Dec 11, 2018

5 checks passed

Hound No violations found. Woof!
WIP ready for review
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.08%) to 92.962%
Details

@wafflebot wafflebot bot removed the in progress label Dec 11, 2018

mxworm added a commit to mxworm/home-assistant that referenced this pull request Dec 11, 2018

Merge branch 'dev' into current
* dev: (26 commits)
  Move daikin to package (home-assistant#19187)
  Restore states for RFLink devices (home-assistant#18816)
  Add SCAN_INTERVAL (home-assistant#19186)
  Enable alarmdecoder to see open/close state of bypassed RF zones when armed (home-assistant#18477)
  Updated frontend to 20181211.0
  Fix cloud defaults (home-assistant#19172)
  TelldusLive config flow (home-assistant#18758)
  ZHA - Event foundation (home-assistant#19095)
  Add raw service data to event (home-assistant#19163)
  Updated frontend to 20181210.1
  Google assistant fix target temp for *F values. (home-assistant#19083)
  Fix lovelace save (home-assistant#19162)
  Drop OwnTracks bad packets (home-assistant#19161)
  Update translations
  Updated frontend to 20181210.0
  Lovelace using storage (home-assistant#19101)
  Update pygtfs to upstream's 0.1.5 (home-assistant#19151)
  Update radiotherm to 2.0.0 and handle change in tstat error detection (home-assistant#19107)
  Upgrade sphinx-autodoc-typehints to 1.5.2 (home-assistant#19140)
  Update geizhals dependency (home-assistant#19152)
  ...

@balloob balloob referenced this pull request Jan 10, 2019

Merged

0.85.0 #19897

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment