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


  • Gradually turn on lights.
    toggledbitsT toggledbits

    This is a Reaction; it can be a Rule's Set or Reset Reaction, or a Global or Rule Set-based Reaction:

    image.png

    Note some instructions are in the comment row.

    Also note that some entities, like those from Hubitat and ZWave-JS, may only show 0.99 as full brightness, so plan your upper-limit accordingly (I've done that here since it will generally work "well enough" for all dimmable entities from any controller). Ramping down would be similar.

    Multi-System Reactor

  • Need help figuring out how to delay a reset on reaction
    therealdbT therealdb

    Also, for me a virtual device instead of checking for rule states seems to be less prone to errors. So I have one for home status, guests, party etc and the rules are much easier to write.

    Multi-System Reactor

  • Way to search for rules (rule state) in other rules
    toggledbitsT toggledbits

    Feature request. Already listed. Hard problem to solve well.

    The awful workaround is to use grep or fgrep on the rules in the storage directory.

    Multi-System Reactor

  • Need help figuring out how to delay a reset on reaction
    toggledbitsT toggledbits

    @tamorgen said in Need help figuring out how to delay a reset on reaction:

    I have to go back and look at the rules, and think "what was I trying to do here again?"

    I have the same problem, and I wrote the darned thing. Use the comments. They really help.

    Multi-System Reactor

  • Reset attribute value of entity in event handler
    toggledbitsT toggledbits

    There are other capabilities that are more useful for things like this. You could use either button or scene_activation, for example, both of which provide a timestamp attribute that your event can modify:

    event_targets:
            interactive_notification_responses:
              name: "Handle notification responses"
              capabilities:
              - scene_activation
              events:
              - event:
                  event_type: mobile_app_notification_action
                  data:
                    action: "LAUNDRY_INSIDE"
                response:
                  "scene_activation.scene_id":
                    expr: "event.data.action"
                  "scene_activation.since":
                    expr: "time()"
    

    The entity value is not changing, because the value doesn't change, right? Or is the event not even triggered? (I don't see the entity flashing in the entities section, when I try to trigger the event)

    That's right. Adding a check to see if since changes will address this.

    Can I add attribute metadata to the rule trigger to see if there was an update?

    You could do that as well, but it's more complicated because right now, the metadata is only accessible in expressions, so you'd need to make a local variable in your rule to grab that metadata.

    Multi-System Reactor

  • Set Reaction > Script Action
    toggledbitsT toggledbits

    I apologize... yes, because that group is fully dynamic (its contents are determined by filter expressions), the range of its actions cannot be determined at startup, so in this instance, you will have to use a Script Action:

    each id in getEntity("groups>dgc_PushableButton_N0").attributes.sys_group.members: 
      performAction( id, "x_hubitat_Refresh.refresh", {} )
    
    Multi-System Reactor

  • Need help figuring out how to delay a reset on reaction
    toggledbitsT toggledbits

    @tamorgen I suspect some other rule is affecting the house mode. At least, that would be the first thing to check.

    A review of the logs will tell you that. What you want to look for are entries that say <Rule:INFO> Phones Home (rule-grp19i3lbdi in xxxxx) evaluated; rule state transition from RESET to SET! and then look at what's going on after that. You may see another rule being triggered.

    You can also look for perform selector.select on Entity#hass>input_select_house_mode with { "value": "Away" } and work backwards from that to see what is running that action. You will typically find a Starting reaction or Resuming reaction line shortly before, and this is the reaction that is setting the away mode.

    Multi-System Reactor

  • Set Reaction > Script Action
    toggledbitsT toggledbits

    Just send the refresh command to the group.

    Multi-System Reactor

  • Set Reaction > Script Action
    therealdbT therealdb

    I use script action a lot with arrays of devices defined in a variable. Very handy for when you want to do it without messing with config files.

    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