Skip to content

Commit

Permalink
Don't reverse the stored fan levels every time fanLevelToHK() is called.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicsuzor committed Feb 7, 2021
1 parent d3ff0b0 commit 679aab4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tado/unified.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ module.exports = {
state.swing = (state.mode === 'OFF' || !modeCapabilities.swing || !device.state.setting.swing || device.state.setting.swing === 'OFF') ?
'SWING_DISABLED' : 'SWING_ENABLED'

state.fanSpeed = (state.mode === 'OFF' || !modeCapabilities.fanSpeeds || !device.state.setting.fanSpeed) ?
0 : fanLevelToHK(device.state.setting.fanSpeed, modeCapabilities.fanSpeeds.reverse())
state.fanSpeed = (state.mode === 'OFF' || !modeCapabilities.fanSpeeds || !device.state.setting.fanSpeed) ?
0 : fanLevelToHK(device.state.setting.fanSpeed, modeCapabilities.fanSpeeds)


return state
Expand Down

0 comments on commit 679aab4

Please sign in to comment.