Skip to content

Commit

Permalink
Add TOGGLE mode to standby monitoring setter
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitea committed Aug 24, 2019
1 parent dde94a0 commit 4034f11
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DysonPureLinkPlugin/dyson_pure_link_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,11 @@ def set_heating_mode(self, mode, max_temperature=None):
def set_standby_monitoring(self, mode):
"""Changes standby monitoring: ON|OFF"""
if self._is_connected:
if mode == 'TOGGLE':
if self.has_valid_data:
mode = 'OFF' if self.state_data.standby_monitoring == 'ON' else 'ON'
else:
return
self._change_state({'rhtm': mode})

def get_data(self):
Expand Down

0 comments on commit 4034f11

Please sign in to comment.