Skip to content

Commit

Permalink
Add support for writing fan speed_percent (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Butler authored Dec 15, 2020
1 parent e6de213 commit ecf308d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/devices/fan.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func fanWrite(device *sdk.Device, data *sdk.WriteData) error {

emitter := utils.GetEmitter(device.GetID())
switch data.Action {
case "speed":
case "speed", "speed_percent":
emitter.Set(v)
default:
return fmt.Errorf("unsupport write action: %v", data.Action)
Expand All @@ -105,7 +105,7 @@ func fanMultiWrite(device *sdk.Device, data *sdk.WriteData) error {

emitter := utils.GetEmitter(device.GetID())
switch data.Action {
case "speed":
case "speed", "speed_percent":
emitter.Set(v)
default:
return fmt.Errorf("unsupport write action: %v", data.Action)
Expand Down

0 comments on commit ecf308d

Please sign in to comment.