Turn on a switch after continuous 1 minute of something

I am looking on how to create a rule in rule machine that if my water sensor detects water for 1 continue minute then it will turn on a virtual switch and if my water sensors stays dry for the same continuous period then it will turn off the same virtual switch.

I have tried next but is not working. Any idea how to make it work?

great, looks to be working as expected. Thanks
Is there a way to see the elapsed time to reach the 1 minute? any place I can see where the timer is?

1 Like

I'm going to pose a question here. BECAUSE I don't know the answer. If the water sensor become wet, but the water drains away, does it reset right away? Or does it need to be dry to reset as a droplets could remain. I don't have any sensors and have been interested in getting one, but I wonder about that. Especially in this use case because it would make sense.

1 Like

I have an smartthings sensor an as soon as the water drains away(water not creating a connection between the 2 metal pins) it sends the "dry" signal.
the problem I have is that sometimes there is just an small amount of water that creates a very weak connection between the metal pins so it will send wet-dry-wet-dry very often, therefore I would use this rule in this post that if only it stays wet/dry for a period of time then a switch will turn on/off and I will then receive a single notification and not everytime the state changes.

2 Likes

Nice. Thanks for explaining.

1 Like

This comment is for someone monitoring a Generator or such to perform an action.
I am testing this rule with my whole home Generator. So far it seems to be working.
I am triggering with a SmartThings Multipurpose Sensor V5 sensor in a plastic box mounted under the Generator.

My need was, when Generator starts and runs for greater then 1 minute, turn off Home Air Conditioner and notify me Generator ran. When Generator stops for greater then 5 minutes, turn on Air Conditioner and notify me Generator stopped. In case you are wondering, I do not want to put such a high load on the Generator. I have 2 other window A/C's that can keep spaces cool. But you could use this just to notify. All my electronic, Hub, modem, router etc are on UPS's so they do not power down during the transition.

IF (Generator Sensor active(F) [FALSE]) THEN
Cancel Delayed Actions
Thermostats: Thermostat --> Mode: off --> delayed: 0:01:00 (cancelable)
Notify Phone: 'Generator on '
ELSE
Cancel Delayed Actions
Thermostats: Thermostat --> Mode: auto --> Heat: 68 --> Cool: 72 --> delayed: 0:05:00 (cancelable)
Notify Phone: 'Generator off'
END-IF


Thank you @Carl for the inspiration.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.