Skip to content

Commit

Permalink
bugfix: fix improper use of case statement in LED write hander for state
Browse files Browse the repository at this point in the history
  • Loading branch information
edaniszewski committed May 14, 2020
1 parent 5f926ec commit e55f23b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/devices/led.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ func ledWrite(device *sdk.Device, data *sdk.WriteData) error {

case "state":
switch cmd := string(data.Data); cmd {
case stateOn:
case stateOff:
case stateBlink:
case stateOn, stateOff, stateBlink:
current["state"] = cmd
emitter.Set(current)
default:
Expand Down

0 comments on commit e55f23b

Please sign in to comment.