Closed TerryLansdown closed 6 years ago
The problem most likely is because you pass the values in an array, and also the brightness should be an number not an string
Try changing the JSON to something like this
{
"on": true,
"duration": 0,
"bri": 100
}
Figured it out, I had a function elsewhere that was setting the msg.payload to 100 not 254. I needed to pass the values as my post above to avoid a 'TypeError: CreateListFromArrayLike called on non-object ' error.
Thanks and apologies for the dumb error.
Hi,
Thanks for the code, working well so far. One problem I’ve noticed, if I inject the following JSON via MQTT, my hue lights switch on, but don’t seem to set the brightness correctly to 100%, I’ve tried with both 255 or “100%”, but either seems to set the brightness to 39% (in the Home app).
Thanks for any help you can offer.