Skip to content

Commit

Permalink
fix: tag for offline
Browse files Browse the repository at this point in the history
  • Loading branch information
LeKovr committed Nov 22, 2023
1 parent 0224907 commit e55038b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hocon.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ type Config struct {
}

const (
port = ":38899"
CmdSet = "setPilot"
CmdGet = "getPilot"
port = ":38899"
CmdSet = "setPilot"
CmdGet = "getPilot"
OffSceneID = 0
)

Expand Down Expand Up @@ -110,6 +110,7 @@ func run(lamp string, key gen.LampScene) (*gen.LampScene, error) {
// } else {
if !res.Result.Params.State {
res.Result.Params.SceneKey = "off"
key = gen.LampScene_OFF
} else {
for k, v := range scene {
if res.Result.Params.SceneID == v {
Expand Down Expand Up @@ -151,4 +152,5 @@ func send(host string, cmd []byte) (rv []byte, err error) {
}
// return string(buffer[0:n]), nil
return buffer[0:n], nil

}

0 comments on commit e55038b

Please sign in to comment.