Skip to content

Commit

Permalink
Merge pull request #21 from NTIA/pre-commit-all-files
Browse files Browse the repository at this point in the history
Merge #20 fix into master
  • Loading branch information
dboulware authored Jan 31, 2023
2 parents 3a56b1b + 74ac897 commit 7e38569
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/its_preselector/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.0.0"
__version__ = "3.0.1"
6 changes: 5 additions & 1 deletion src/its_preselector/controlbyweb_web_relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ def get_digital_input_value(self, input_num: int) -> bool:
"""
Read boolean value from a digital input of the WebRelay.
A value of ``False`` is returned if the digital input is not
configured, since the XML response includes a zero for any
digital inputs which exist but are not configured.
:param input_num: Configured index of the desired digital input.
:return: The boolean value of the desired digital input.
"""
Expand All @@ -77,7 +81,7 @@ def get_digital_input_value(self, input_num: int) -> bool:
digital_input = root.find(input_tag)
if digital_input is None:
raise ConfigurationException(f"Digital Input {input_num} does not exist.")
return bool(digital_input.text)
return bool(int(digital_input.text))

def set_state(self, key):
"""
Expand Down

0 comments on commit 7e38569

Please sign in to comment.