Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

Commit

Permalink
Drop press action due to duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
zachfi committed May 5, 2023
1 parent a2df9ce commit a5ab99a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/lights/lights.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (l *Lights) ActionHandler(ctx context.Context, action *iot.Action) error {
)

switch action.Event {
case "single", "press", "button_1_press":
case "single", "button_1_press":
return z.Toggle(ctx)
case "on", "double", "tap", "rotate_right", "slide", "on_press":
err := z.SetBrightness(ctx, Brightness_FULL)
Expand Down Expand Up @@ -194,7 +194,7 @@ func (l *Lights) ActionHandler(ctx context.Context, action *iot.Action) error {
return z.On(ctx)
case "many":
return z.Alert(ctx)
case "wakeup", "release": // do nothing
case "wakeup", "press", "release": // do nothing
return nil
default:
return errors.Wrap(ErrUnknownActionEvent, action.Event)
Expand Down

0 comments on commit a5ab99a

Please sign in to comment.