Skip to content

Commit

Permalink
Update GpioFan.js
Browse files Browse the repository at this point in the history
Bug fix, see #188.
  • Loading branch information
ebaauw committed Dec 4, 2024
1 parent 815504d commit c5ba047
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/RpiService/GpioFan.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class GpioFan extends ServiceDelegate {
key: 'on',
Characteristic: this.Characteristics.hap.On,
setter: async (value) => {
const dutyCycle = value ? Math.round(this.values.brightness * 2.55) : 0
const dutyCycle = value ? Math.round(this.values.speed * 2.55) : 0
this.values.dutyCycle = this.reversed ? 255 - dutyCycle : dutyCycle
await this.update()
}
Expand Down

0 comments on commit c5ba047

Please sign in to comment.