-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: convert devices:commands command to yargs #690
refactor: convert devices:commands command to yargs #690
Conversation
|
src/commands/devices/commands.ts
Outdated
], | ||
[ | ||
'$0 devices:commands 6d73e4d1-3278-44d4-915a-099a62f05330 \'switchLevel:setLevel(50)\'', | ||
'send the "setLevel" command passing 50 as an argument for the "switch" capability to the specified device' + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switchLevel capability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I also cleaned up the text in the note.)
})).component | ||
|
||
if (isIndexArgument(input)) { | ||
cmd.component = device.components[Number.parseInt(input) - 1].id || '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh jeez... and maybe this is totes fine. but is input safe to -1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not but this is just moved code and I've written an issue to address issues with it already.
c3b1ff6
to
9a0e52b
Compare
devices:commands
to yargs