Skip to content

Commit

Permalink
Fix code slot erros (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 authored Oct 29, 2020
1 parent fd45b69 commit bc09882
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion custom_components/lock-manager/const.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DOMAIN = "lock-manager"
VERSION = "0.0.34"
VERSION = "0.0.35"
ISSUE_URL = "https://github.com/FutureTense/lock-manager"
PLATFORM = "sensor"
ZWAVE_NETWORK = "zwave_network"
Expand Down
10 changes: 6 additions & 4 deletions custom_components/lock-manager/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ def update(self):
str(value.value),
)
# do not update if the code contains *s
code = value.value
if "*" in str(value.value):
_LOGGER.debug("DEBUG: Ignoring code slot with * in value.")
continue
code = "Unknown"
sensor_name = f"code_slot_{value.index}"
data[sensor_name] = value.value
data[sensor_name] = code

self._data = data

Expand All @@ -98,11 +99,12 @@ def update(self):
str(value.value),
)
# do not update if the code contains *s
code = value.value
if "*" in str(value.value):
_LOGGER.debug("DEBUG: Ignoring code slot with * in value.")
continue
code = "Unknown"
sensor_name = f"code_slot_{value.index}"
data[sensor_name] = value.value
data[sensor_name] = code

self._data = data

Expand Down

0 comments on commit bc09882

Please sign in to comment.