3 ms·
> Something I wish they'd get to is looping support. It's unusual that you need a third party extension to do a for-loop. Out of curiosity, what do you need a
by gregmac 5y ago
> Something I wish they'd get to is looping support. It's unusual that you need a third party extension to do a for-loop.
Out of curiosity, what do you need a for loop for?
I've so far only created a single loop: it randomly changes the colors of a couple lights in my office.
This uses a delay component and a switch (controllable from Home Assistant) called "office_lights_cycle". The switch both initially triggers and breaks the loop. When executed, it picks a random color for one light, sets the other to a complementary hue 90° away, sets them with a transition time of 300s (very slow fade), and the loop triggers again a few minutes later.
https://i.imgur.com/XM53DO4.png https://i.imgur.com/XM53DO4.png
- ViViDboarder 5y agoInstead of looping through things I split items, process in parallel, and then join.
- peterhajas 5y agoI’m curious - how do you split items up and process them in parallel?
- traverseda 5y agoA map call? Not actually parallel, but I presume that's what they meant.