Skip to content

Commit

Permalink
Merge pull request #29 from sh00t2kill/fix-last-reset
Browse files Browse the repository at this point in the history
fix logic as to when to reset
  • Loading branch information
sh00t2kill authored Jan 23, 2024
2 parents 56f33f5 + b04ad65 commit 987ab41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/linktap/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def state(self):
self._state = self.translate_plan_mode(attributes["plan_mode"])
else:
self._state = attributes[self.attribute]
if self.attribute == "volume":
if self.attribute == "volume" and self._state == 0:
self.last_reset = dt_util.utcnow()

return self._state
Expand Down

0 comments on commit 987ab41

Please sign in to comment.