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
Fix inverted sensors on the concord232 binary sensor component #11261
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! See comment below.
@@ -118,7 +118,7 @@ def name(self): | |||
def is_on(self): | |||
"""Return true if the binary sensor is on.""" | |||
# True means "faulted" or "open" or "abnormal state" | |||
return bool(self._zone['state'] == 'Normal') | |||
return bool(self._zone['state'] == 'Tripped') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should check against 'Normal'
according to the comment, since the zone can take multiple states that are not normal:
https://github.com/JasonCarter80/concord232/blob/5ec7987beb5fb6522322936fc52b4f0530b52eea/concord232/concord_commands.py#L129-L136
return bool(self._zone['state'] != 'Normal')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it to reflect this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* Revert "Adding MotionIP to BinarySensors for HMIP-SMI (#11268)" This reverts commit c94cc34. * Revert "Bugfix: 10509 - http is hard coded in plex sensor (#11072)" This reverts commit 901d4b5. * Revert "Fix handling zero values for state_on/state_off (#11264)" This reverts commit 2e4e3a4. * Revert "Fix inverted sensors on the concord232 binary sensor component (#11261)" This reverts commit b866687. * Revert "Proper Steam game names and small fixes (#11182)" This reverts commit 7faa940. * Revert "Bugfix homematic available modus (#11256)" This reverts commit 1d57958. * Revert "Fix detection of if a negative node is in use (#11255)" This reverts commit b28bfad. * Revert "added myself to become code owner for miflora and plant (#11251)" This reverts commit e068204. * Revert "Add workaround for running tox on Windows platforms (#11188)" This reverts commit 81f1a65. * Revert "Upgrade to new miflora version 0.2.0 (#11250)" This reverts commit 8efc4b5. * Revert "homematic: add username and password to interface config schema (#11214)" This reverts commit b4e2537. * Revert "Backup configuration files before overwriting (#11216)" This reverts commit 90e25a6.
* Fix inverted sensors on the concord232 binary sensor component * Changed from == Tripped to != Normal
Description:
This fixes the inverted sensors of the concord232 binary sensor component
Related issue (if applicable): fixes #10797
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for
configuration.yaml
(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
tox
run successfully. Your PR cannot be merged unless tests passREQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices:
tox
run successfully. Your PR cannot be merged unless tests pass