diff --git a/cmd/setstate.go b/cmd/setstate.go index bd71140..376f559 100644 --- a/cmd/setstate.go +++ b/cmd/setstate.go @@ -37,6 +37,11 @@ func SetStateCmd(args CmdArgs) (int, error) { fast := args.Flags.Bool("fast") state.Fast = fast + if power == "" && color == "" && brightnessFlag == "" && infraredFlag == "" { + printCmdHelp(args.Name) + return ExitFailure, nil + } + r, err := c.SetState(selector, state) if err != nil { return ExitFailure, err diff --git a/cmd/setwhite.go b/cmd/setwhite.go index 3c19b28..0179625 100644 --- a/cmd/setwhite.go +++ b/cmd/setwhite.go @@ -52,6 +52,11 @@ func SetWhiteCmd(args CmdArgs) (int, error) { fast := args.Flags.Bool("fast") state.Fast = fast + if power == "" && kelvinFlag == "" && name == "" && brightnessFlag == "" && infraredFlag == "" { + printCmdHelp(args.Name) + return ExitFailure, nil + } + r, err := c.SetState(selector, state) if err != nil { return ExitFailure, err