Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Unsolved
Collapse
Discussion Forum to share and further the development of home control and automation, independent of platforms.

Global Moderators

Forum wide moderators

Private

Posts


  • [MSR] Feature request: For Each action on arrays/groups
    toggledbitsT toggledbits

    @therealdb said in [MSR] Feature request: For Each action on arrays/groups:

    There's no way to filter the group devices.

    This is a comment I'm curious about, because there actually is a way to filter a group. But that may not be much help on its own without a couple of additional changes. I am working on parameters for reactions. I think that will address the need for different scripts. Delays in scripts also came to mind when I did the alarm() function, so that's a distinct possibility in the near future. I'm bookmarking this thread so that the work I'm doing on reactions trends toward making this easier. Thanks for the detail!

    Multi-System Reactor

  • [MSR] Feature request: For Each action on arrays/groups
    therealdbT therealdb

    That's one case:

    image.png

    I want to send the ON/OFF command again, until every device in the group is ON/OFF. I have a count just to avoid an infinite loop.

    It works, but it's not ideal to send a command to a device already on (or off) - because I want to avoid unnecessary traffic. There's no way to filter the group devices. I know I could write a script and do it, but the point here is to avoid a script if possible.

    devices_status = false,
    counter = counter + 1,
    finalStatus = true,
    
    each id in getEntity('groups>ac_casa1').attributes.sys_group.members: do
      v = bool(getEntity( id )?.attributes?.power_switch?.state),
      #print("!!!!!!DEBUG" + getEntity( id ).name + " - " + v + " - " + devices_status + " - " + finalStatus),
      devices_status = (v == finalStatus) && devices_status
    done
    

    EDIT: also, there's no way to delay in code, so I need 2 scripts anyway, to send on/off and then set the mode. Thanks.

    Multi-System Reactor

  • [MSR] Feature request: For Each action on arrays/groups
    toggledbitsT toggledbits

    @therealdb said in [MSR] Feature request: For Each action on arrays/groups:

    Correct me if I'm wrong, unless I create two separated groups (one with on and one with off devices), but this seems messy.

    You can send power_switch.on and power_switch.off to the same group, you don't need two groups.

    Help me understand the problem more fully. Let's get into detail here. How are you creating the groups now?

    Multi-System Reactor

  • [MSR] Feature request: For Each action on arrays/groups
    therealdbT therealdb

    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.

    Multi-System Reactor

  • Home Assistant Connect ZWA-2 & ZBT-2
    toggledbitsT toggledbits

    Now on my Christmas wish list...

    Hardware

  • [Solved] Error: Command timeout
    toggledbitsT toggledbits

    OK. I DM'd you something else to try.

    Multi-System Reactor

  • [MSR] Feature request: For Each action on arrays/groups
    toggledbitsT 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.set to the group). Does not that fully address your need?

    Ref: DynamicGroupController Group Actions

    Multi-System Reactor

  • [MSR] Feature request: For Each action on arrays/groups
    therealdbT therealdb

    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:

    ac8eb1a8-7586-4f96-b52c-65c08d4dcf03-image.png

    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 !

    Multi-System Reactor

  • [Solved] Error: Command timeout
    therealdbT therealdb

    @toggledbits nope. Unfortunately, the problems on one of my system I mentioned in my DMs are still there. It's better for sure, but I have lots of timeout while in VPN.

    It's probably related to the network in general, but since it's a beach house, I'll try to resolve it at spring time. I'll probably invest in some better network gear and call it a day. My problems are quite similar, but my main obstacle is the structure load, that goes in timeout and forces me to reload the page until it loads.

    Multi-System Reactor

  • [Solved] Error: Command timeout
    toggledbitsT toggledbits

    @gwp1 great news!

    @therealdb are you seeing better as well?

    Multi-System Reactor

Member List

CatmanV2C CatmanV2
therealdbT therealdb
toggledbitsT toggledbits
akbooerA akbooer
DesTD DesT
rafale77R rafale77
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Unsolved