[MSR] Feature request: For Each action on arrays/groups
-
I have a couple of situation where I'm using code to iterate over an array (ie: climate entities, lights) to operate them in group, and repeat until every one has done what it needs to do.
It will be very cool to have a For Each command that could iterate visually on the array, so I could continue to define it visually. Pseudo UI, so it's easier to explain:
I'm ok with devices being of type
Entity[], loaded via a script block, or with Dynamic Groups (but, in my specific case, this list is know at runtime only).I know it's not trivial, but one may dream
Thanks @toggledbits ! -
DynamicGroupController has the ability to enable actions on the group that pass through to the device in the group (i.e. if you have a group of dimmers, you can set them all at once by sending
dimming.setto the group). Does not that fully address your need? -
yes. I know about DynamicGroupsController and I'm using it in other situations (dead zwave devices, battery low, etc). Problem is that this list is dynamic, ie based on other external conditions (are guest over? is christmas? etc). I tried, but I'm back at code, unfortunately.
EDIT: anyway, if I want to send the command, let's say, only to on devices in a group, I have to use code. Correct me if I'm wrong, unless I create two separated groups (one with on and one with off devices), but this seems messy.









