Skip to content

Commit

Permalink
Fix change mode event mode check
Browse files Browse the repository at this point in the history
  • Loading branch information
sebr committed Feb 12, 2022
1 parent c509eab commit 72616d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/bhyve/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ def _on_ws_data(self, data):

event = data.get("event")
if event in (EVENT_DEVICE_IDLE, EVENT_WATERING_COMPLETE) or (
event == EVENT_CHANGE_MODE and event.get("mode") in ("off", "auto")
event == EVENT_CHANGE_MODE and data.get("mode") in ("off", "auto")
):
self._is_on = False
self._set_watering_started(None)
Expand Down

0 comments on commit 72616d2

Please sign in to comment.