@@ -61,7 +61,7 @@ func main() {
61
61
UsageText : "kasa info host" ,
62
62
ArgsUsage : "host" ,
63
63
Arguments : []cli.Argument {
64
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
64
+ & cli.StringArg {Name : "host" , Destination : & host },
65
65
},
66
66
Action : func (ctx context.Context , cmd * cli.Command ) error {
67
67
k , err := getKasaDevice (cmd )
@@ -100,7 +100,7 @@ func main() {
100
100
UsageText : "kasa status host" ,
101
101
ArgsUsage : "host" ,
102
102
Arguments : []cli.Argument {
103
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
103
+ & cli.StringArg {Name : "host" , Destination : & host },
104
104
},
105
105
Action : func (ctx context.Context , cmd * cli.Command ) error {
106
106
k , err := getKasaDevice (cmd )
@@ -127,8 +127,8 @@ func main() {
127
127
UsageText : "kasa brightness host (value: 0-100)" ,
128
128
ArgsUsage : "host brightness" ,
129
129
Arguments : []cli.Argument {
130
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
131
- & cli.StringArg {Name : "brightness" , Min : 1 , Max : 1 , Destination : & value },
130
+ & cli.StringArg {Name : "host" , Destination : & host },
131
+ & cli.StringArg {Name : "brightness" , Destination : & value },
132
132
},
133
133
Action : func (ctx context.Context , cmd * cli.Command ) error {
134
134
k , err := getKasaDevice (cmd )
@@ -155,7 +155,7 @@ func main() {
155
155
UsageText : "kasa nocloud host" ,
156
156
ArgsUsage : "host" ,
157
157
Arguments : []cli.Argument {
158
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
158
+ & cli.StringArg {Name : "host" , Destination : & host },
159
159
},
160
160
Action : func (ctx context.Context , cmd * cli.Command ) error {
161
161
k , err := getKasaDevice (cmd )
@@ -171,7 +171,7 @@ func main() {
171
171
UsageText : "kasa cloud host username password" ,
172
172
ArgsUsage : "host" ,
173
173
Arguments : []cli.Argument {
174
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
174
+ & cli.StringArg {Name : "host" , Destination : & host },
175
175
},
176
176
Action : func (ctx context.Context , cmd * cli.Command ) error {
177
177
k , err := getKasaDevice (cmd )
@@ -186,8 +186,8 @@ func main() {
186
186
Usage : "toggle a relay's state" ,
187
187
ArgsUsage : "[-c child ID] host true|false" ,
188
188
Arguments : []cli.Argument {
189
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
190
- & cli.StringArg {Name : "state" , Min : 1 , Max : 1 , Destination : & value },
189
+ & cli.StringArg {Name : "host" , Destination : & host },
190
+ & cli.StringArg {Name : "state" , Destination : & value },
191
191
},
192
192
Action : func (ctx context.Context , cmd * cli.Command ) error {
193
193
b , err := strconv .ParseBool (value )
@@ -210,8 +210,8 @@ func main() {
210
210
Usage : "disable status LED" ,
211
211
ArgsUsage : "host true|false" ,
212
212
Arguments : []cli.Argument {
213
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
214
- & cli.StringArg {Name : "state" , Min : 1 , Max : 1 , Destination : & value },
213
+ & cli.StringArg {Name : "host" , Destination : & host },
214
+ & cli.StringArg {Name : "state" , Destination : & value },
215
215
},
216
216
Action : func (ctx context.Context , cmd * cli.Command ) error {
217
217
b , err := strconv .ParseBool (value )
@@ -260,8 +260,8 @@ func main() {
260
260
Usage : "adjust device countdowns" ,
261
261
ArgsUsage : "host [delete]" ,
262
262
Arguments : []cli.Argument {
263
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
264
- & cli.StringArg {Name : "delete" , Min : 0 , Max : 1 , Destination : & value },
263
+ & cli.StringArg {Name : "host" , Destination : & host },
264
+ & cli.StringArg {Name : "delete" , Destination : & value },
265
265
},
266
266
Action : func (ctx context.Context , cmd * cli.Command ) error {
267
267
k , err := getKasaDevice (cmd )
@@ -286,7 +286,7 @@ func main() {
286
286
Usage : "reboot device" ,
287
287
ArgsUsage : "host" ,
288
288
Arguments : []cli.Argument {
289
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
289
+ & cli.StringArg {Name : "host" , Destination : & host },
290
290
},
291
291
Action : func (ctx context.Context , cmd * cli.Command ) error {
292
292
k , err := getKasaDevice (cmd )
@@ -302,8 +302,8 @@ func main() {
302
302
Usage : "update device name (alias)" ,
303
303
ArgsUsage : "host new-name" ,
304
304
Arguments : []cli.Argument {
305
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
306
- & cli.StringArg {Name : "newname" , Min : 1 , Max : 1 , Destination : & value },
305
+ & cli.StringArg {Name : "host" , Destination : & host },
306
+ & cli.StringArg {Name : "newname" , Destination : & value },
307
307
},
308
308
Action : func (ctx context.Context , cmd * cli.Command ) error {
309
309
k , err := getKasaDevice (cmd )
@@ -322,8 +322,8 @@ func main() {
322
322
Usage : "send raw command" ,
323
323
ArgsUsage : "host command" ,
324
324
Arguments : []cli.Argument {
325
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
326
- & cli.StringArg {Name : "command" , Min : 1 , Max : 1 , Destination : & value },
325
+ & cli.StringArg {Name : "host" , Destination : & host },
326
+ & cli.StringArg {Name : "command" , Destination : & value },
327
327
},
328
328
Action : func (ctx context.Context , cmd * cli.Command ) error {
329
329
k , err := getKasaDevice (cmd )
@@ -338,9 +338,9 @@ func main() {
338
338
Usage : "configure wifi" ,
339
339
ArgsUsage : "host ssid key" ,
340
340
Arguments : []cli.Argument {
341
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
342
- & cli.StringArg {Name : "ssid" , Min : 1 , Max : 1 , Destination : & value },
343
- & cli.StringArg {Name : "key" , Min : 1 , Max : 1 , Destination : & secondary },
341
+ & cli.StringArg {Name : "host" , Destination : & host },
342
+ & cli.StringArg {Name : "ssid" , Destination : & value },
343
+ & cli.StringArg {Name : "key" , Destination : & secondary },
344
344
},
345
345
Action : func (ctx context.Context , cmd * cli.Command ) error {
346
346
k , err := getKasaDevice (cmd )
@@ -356,7 +356,7 @@ func main() {
356
356
Usage : "check device wifi status" ,
357
357
ArgsUsage : "host" ,
358
358
Arguments : []cli.Argument {
359
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
359
+ & cli.StringArg {Name : "host" , Destination : & host },
360
360
},
361
361
Action : func (ctx context.Context , cmd * cli.Command ) error {
362
362
k , err := getKasaDevice (cmd )
@@ -376,9 +376,9 @@ func main() {
376
376
Usage : "add device countdown" ,
377
377
ArgsUsage : "host duration True|False" ,
378
378
Arguments : []cli.Argument {
379
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
380
- & cli.StringArg {Name : "duration" , Min : 1 , Max : 1 , Destination : & value },
381
- & cli.StringArg {Name : "target" , Min : 1 , Max : 1 , Destination : & secondary },
379
+ & cli.StringArg {Name : "host" , Destination : & host },
380
+ & cli.StringArg {Name : "duration" , Destination : & value },
381
+ & cli.StringArg {Name : "target" , Destination : & secondary },
382
382
},
383
383
Action : func (ctx context.Context , cmd * cli.Command ) error {
384
384
k , err := getKasaDevice (cmd )
@@ -404,7 +404,7 @@ func main() {
404
404
Usage : "remove coundown rules" ,
405
405
ArgsUsage : "host" ,
406
406
Arguments : []cli.Argument {
407
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
407
+ & cli.StringArg {Name : "host" , Destination : & host },
408
408
},
409
409
Action : func (ctx context.Context , cmd * cli.Command ) error {
410
410
k , err := getKasaDevice (cmd )
@@ -418,7 +418,7 @@ func main() {
418
418
Name : "getcountdown" ,
419
419
Usage : "view countdown rules" ,
420
420
ArgsUsage : "host" ,
421
- Arguments : []cli.Argument {& cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host }},
421
+ Arguments : []cli.Argument {& cli.StringArg {Name : "host" , Destination : & host }},
422
422
Action : func (ctx context.Context , cmd * cli.Command ) error {
423
423
k , err := getKasaDevice (cmd )
424
424
if err != nil {
@@ -437,7 +437,7 @@ func main() {
437
437
Usage : "check dimmer parameters" ,
438
438
ArgsUsage : "host" ,
439
439
Arguments : []cli.Argument {
440
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
440
+ & cli.StringArg {Name : "host" , Destination : & host },
441
441
},
442
442
Action : func (ctx context.Context , cmd * cli.Command ) error {
443
443
k , err := getKasaDevice (cmd )
@@ -457,7 +457,7 @@ func main() {
457
457
Usage : "check running rules" ,
458
458
ArgsUsage : "host" ,
459
459
Arguments : []cli.Argument {
460
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
460
+ & cli.StringArg {Name : "host" , Destination : & host },
461
461
},
462
462
Action : func (ctx context.Context , cmd * cli.Command ) error {
463
463
k , err := getKasaDevice (cmd )
@@ -477,8 +477,8 @@ func main() {
477
477
Usage : "set operating mode" ,
478
478
ArgsUsage : "host mode" ,
479
479
Arguments : []cli.Argument {
480
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
481
- & cli.StringArg {Name : "mode" , Min : 1 , Max : 1 , Destination : & value },
480
+ & cli.StringArg {Name : "host" , Destination : & host },
481
+ & cli.StringArg {Name : "mode" , Destination : & value },
482
482
},
483
483
Action : func (ctx context.Context , cmd * cli.Command ) error {
484
484
k , err := getKasaDevice (cmd )
@@ -541,8 +541,8 @@ func main() {
541
541
Usage : "set fade on time" ,
542
542
ArgsUsage : "time in ms" ,
543
543
Arguments : []cli.Argument {
544
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
545
- & cli.StringArg {Name : "time" , Min : 1 , Max : 1 , Destination : & value },
544
+ & cli.StringArg {Name : "host" , Destination : & host },
545
+ & cli.StringArg {Name : "time" , Destination : & value },
546
546
},
547
547
Action : func (ctx context.Context , cmd * cli.Command ) error {
548
548
k , err := getKasaDevice (cmd )
@@ -561,8 +561,8 @@ func main() {
561
561
Usage : "set fade off time" ,
562
562
ArgsUsage : "time in ms" ,
563
563
Arguments : []cli.Argument {
564
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
565
- & cli.StringArg {Name : "time" , Min : 1 , Max : 1 , Destination : & value },
564
+ & cli.StringArg {Name : "host" , Destination : & host },
565
+ & cli.StringArg {Name : "time" , Destination : & value },
566
566
},
567
567
Action : func (ctx context.Context , cmd * cli.Command ) error {
568
568
k , err := getKasaDevice (cmd )
@@ -581,8 +581,8 @@ func main() {
581
581
Usage : "set gentle on time" ,
582
582
ArgsUsage : "time in ms" ,
583
583
Arguments : []cli.Argument {
584
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
585
- & cli.StringArg {Name : "time" , Min : 1 , Max : 1 , Destination : & value },
584
+ & cli.StringArg {Name : "host" , Destination : & host },
585
+ & cli.StringArg {Name : "time" , Destination : & value },
586
586
},
587
587
Action : func (ctx context.Context , cmd * cli.Command ) error {
588
588
k , err := getKasaDevice (cmd )
@@ -601,8 +601,8 @@ func main() {
601
601
Usage : "set gentle off time" ,
602
602
ArgsUsage : "time in ms" ,
603
603
Arguments : []cli.Argument {
604
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
605
- & cli.StringArg {Name : "time" , Min : 1 , Max : 1 , Destination : & value },
604
+ & cli.StringArg {Name : "host" , Destination : & host },
605
+ & cli.StringArg {Name : "time" , Destination : & value },
606
606
},
607
607
Action : func (ctx context.Context , cmd * cli.Command ) error {
608
608
k , err := getKasaDevice (cmd )
@@ -621,9 +621,9 @@ func main() {
621
621
Usage : "check energy usage" ,
622
622
ArgsUsage : "host month year" ,
623
623
Arguments : []cli.Argument {
624
- & cli.StringArg {Name : "host" , Min : 1 , Max : 1 , Destination : & host },
625
- & cli.StringArg {Name : "month" , Min : 0 , Max : 1 , Destination : & value },
626
- & cli.StringArg {Name : "year" , Min : 0 , Max : 1 , Destination : & secondary },
624
+ & cli.StringArg {Name : "host" , Destination : & host },
625
+ & cli.StringArg {Name : "month" , Destination : & value },
626
+ & cli.StringArg {Name : "year" , Destination : & secondary },
627
627
},
628
628
Action : func (ctx context.Context , cmd * cli.Command ) error {
629
629
k , err := getKasaDevice (cmd )
0 commit comments