Skip to content

Commit

Permalink
Merge pull request #9 from nickrw/fix-fan-mode-ref
Browse files Browse the repository at this point in the history
Fix reference to missing fan_mode property
  • Loading branch information
seanrees authored Jan 15, 2021
2 parents 7440840 + 2d5577e commit 557e5e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,11 @@ def updatePureCoolV2State(self, name: str, serial: str, message: dyson_pure_stat
fan_mode = 'AUTO'
elif message.fan_power == const.FanPower.POWER_ON.value:
fan_mode = 'FAN'
elif message.fan_power == const.FanPower.POWER_OFF.value:
pass
else:
logging.warning('Received unknown fan_power setting from "%s" (serial=%s): %s, defaulting to "%s',
name, serial, message.fan_mode, fan_mode)
logging.warning('Received unknown fan_power setting from "%s" (serial=%s): "%s", defaulting to "%s"',
name, serial, message.fan_power, fan_mode)
update_enum(self.fan_mode, name, serial, fan_mode)

if isinstance(message, dyson_pure_state_v2.DysonPureHotCoolV2State):
Expand Down

0 comments on commit 557e5e6

Please sign in to comment.