neilenns / node-red-contrib-wled2

NodeRed node for controlling WLED
MIT License
19 stars 8 forks source link

Alter state request to affect all segments #71

Closed daredoes closed 3 years ago

daredoes commented 3 years ago

Fixes #72

This pull request will use an undocumented aspect of the JSON API, that can be seen when observing the network requests from the built-in UI, to update all segments, rather than the first segment.

It turns out, when seg receives an object without an ID instead of an array it applies to all segments for the light.

Tested locally.

Related to #61 but not a perfect solution

daredoes commented 3 years ago

Ah, I see from the failing tests that there's some built-in class logic to address.

I tested this by editing the distributed JS file, which I can confirm does make a difference.

I'll try to update the base class for this PR soon

daredoes commented 3 years ago

This PR should be good for review now!

neilenns commented 3 years ago

Can you please open a new issue that describes the problem you were fixing with this PR? Then I will have a historical record to tie this pull request to and something to reference in the changelog.

daredoes commented 3 years ago

Left an issue with some basic details since it links back to this PR!