water action fixes

This commit is contained in:
Your Name
2019-11-06 09:20:11 +03:00
parent 94778c039e
commit 7a32cb74da
24 changed files with 178 additions and 44 deletions
@@ -32,7 +32,7 @@ class ToiletPresence(hass.Hass):
def distance_changed(self, entity, attribute, old, new, kwargs):
distance = int(new)
state = ""
if (distance > 1000 or distance < 850):
if (distance > 1100 or distance < 750):
self.timers_off()
self.timers.append(self.run_in(self.run_in_presense_off, self.presence_timeout))
self.log('re-setting timer for {}s.'.format(self.presence_timeout))