Skip to content

Commit

Permalink
Remove obsolete/invalid parameters from setPilot (#7)
Browse files Browse the repository at this point in the history
A recent upgrade to the A19 bulbs breaks this code.  If the parameters "sceneId":0,"c":0,"w":0 are sent to the bulb, it returns 'Invalid params' and fails.
  • Loading branch information
Jason Lau authored Jul 19, 2020
1 parent 5e955c6 commit dfc8675
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class Client extends EventEmitter {
const msg = JSON.stringify({
method: 'setPilot',
env: 'pro',
params: { mac: getMAC(), src: 'udp', sceneId: 0, c: 0, w: 0, ...state },
params: { mac: getMAC(), src: 'udp', ...state },
});
this.socket.send(msg, 0, msg.length, 38899, host);
}
Expand Down

0 comments on commit dfc8675

Please sign in to comment.