No announcement yet.

Trigger an event "was Off" set to "off"

  • Filter
  • Time
  • Show
Clear All
new posts

    Trigger an event "was Off" set to "off"


    I had hoped that this would be easy but I can't get it to work. I would like to trigger an event so that if a light is currently OFF and I press the off (dim) button which doesn't do anything apart from update the value to OFF in homeseer then I want an event to fire.

    I don't want the event to fire if the light is already on. I want to make a hidden trigger that will work if I set the device to off when it's already off. However I have not been able to get this to work.

    I have tried using the "was this set to this" as off and off but this doesn't work.

    Can anyone offer any help please.

    Interesting question. How about this?
    Trigger: If the device was just set or changed
    Condition: And If the device value has not changed for at least
    And If the device value is off
    Mike____________________________________________________________ __________________
    HS3 Pro Edition, NUC i3

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti


      By default on the devices, there is a flag set that does not update the last time changed if the value doesn't change. If off and you press off the device last change time is not updated. Unchecking the box on the device page (Do not update device last change time if device value does not change) will change the time stamp. You can then use a counter for the switch to record current state.

      Three events would take care of this.

      If light has been off for 5 seconds
      set counter to 0.

      If light has been on for 5 seconds
      set counter to 1

      If light changes to off (This event has to trigger within the 5 second window)
      and counter is 0
      Do stuff.

      Click image for larger version  Name:	Screenshot from 2020-11-21 09-21-37.png Views:	0 Size:	156.4 KB ID:	1435221


        I was ok with the "status update" checkbox item. This has come up before, but thanks for the post. It's definitely a good reminder for anyone that hasn't seen that.

        I like the counter idea, I use that to set different moods in the kids rooms and hadn't thought of using that here. If I wasn't using easytrigger as the solution then that would have been the only way to do it I think. However I managed to get this working with normal triggers and an easytrigger one. Here's how I did it.

        [NORMAL TRIGGER] - IF "SwitchX" had its value set to "OFF"
        [Easytrigger TRIGGER] - AND IF "SwitchX" has NOT been in the range of 1-99 (some devices are different of course) for at least 5s

        THEN: Turn on the bathroom radiator.

        BINGO. Now I can use the light as normal but in the morning when I want the bathroom radiator to be warm before I get out of bed I can press the OFF button when the light is already off. That way I can still use the light when I don't want the radiator to come on.

        One point to note: I tried this with a 3 second setting and it sometimes didn't work properly. 5 seconds seems a safe bet.

        I'm happy we got there. Thanks for the posts guys.
        Click image for larger version

Name:	Off trigger.JPG
Views:	83
Size:	54.4 KB
ID:	1435261


          I love this so much I am going to use it as an ALL OFF for all my rooms. Instead of a double press on the switch. I am going to use this logic to turn all the other lights in a room off, if the OFF button is pressed and the lights/load that that particular switch controls are already off.


            I have been doing this for a while but using Insteon switches/dimmers... I use double-tap to trigger events. I dont need to use Easytrigger since Insteon's Fast on / off (aka Double Tap) is a normal thing. Do your switches use multitap?