Merge pull request #19 from Jonarod/master

Inverted logic in Controllable
This commit is contained in:
Alexis Viscogliosi 2021-01-25 09:13:27 +01:00 committed by GitHub
commit 6ce59fd4b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

2
go.mod
View file

@ -1,3 +1,3 @@
module github.com/expectedsh/go-sonic
module github.com/Jonarod/go-sonic
go 1.14

View file

@ -45,7 +45,7 @@ func NewControl(host string, port int, password string) (Controllable, error) {
}
func (c controlChannel) Trigger(action Action) (err error) {
if IsActionValid(action) {
if !IsActionValid(action) {
return ErrActionName
}
err = c.write(fmt.Sprintf("TRIGGER %s", action))