Closed WeslleyDeSouza closed 7 years ago
You would replace the displayStatus
function with a function that used the status value that it is provided with to obtain the on
value.
For example:
function myOnStatus(status) {
var onState = status.state.on;
console.log("Light on state is " + onState);
}
Hello, I can get the state of the Lamp by:
api.lightStatus(5) .then(displayStatus) .done();
and get the value:
{ "state": { "on": true, "bri": 254, "hue": 34515, "sat": 236, "xy": [ 0.3138, 0.3239 ],
how can I get ony the value from "on" ?
thanks!