Merge pull request #19 from Jonarod/master
Inverted logic in Controllable
This commit is contained in:
commit
6ce59fd4b8
2 changed files with 2 additions and 2 deletions
2
go.mod
2
go.mod
|
|
@ -1,3 +1,3 @@
|
||||||
module github.com/expectedsh/go-sonic
|
module github.com/Jonarod/go-sonic
|
||||||
|
|
||||||
go 1.14
|
go 1.14
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ func NewControl(host string, port int, password string) (Controllable, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c controlChannel) Trigger(action Action) (err error) {
|
func (c controlChannel) Trigger(action Action) (err error) {
|
||||||
if IsActionValid(action) {
|
if !IsActionValid(action) {
|
||||||
return ErrActionName
|
return ErrActionName
|
||||||
}
|
}
|
||||||
err = c.write(fmt.Sprintf("TRIGGER %s", action))
|
err = c.write(fmt.Sprintf("TRIGGER %s", action))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue