

If you are using the toggle to then perform an action in the 'OnCheck' action of the control, then do your formula, and then at the end, place a Set (setToggle, false) to reset the toggle back so that it can be 'called' again. It also took me a few times to learn about 'Cancellable" actions in RM that are required if you use Delay to implement this. Set (setToggle, true) Then on your Default property of the Toggle control, set this formula: setToggle.

This app is cleaner to maintain after a dealing with just few lights in the house. I had RM rules to deal with this but since you can't reference the trigger device (yo I ended up with a lot of copies of the same logic. Sometimes the bathroom lights are left on for a few hours and sometimes the basement lights are left on so long that I can feel the hot spots on the floor above. I have a few lights in the house that always seem to be left on. If you need different auto-off times for different switches, just add another instance of this app. Each switch is tracked individually but they all share the auto-off time setting. The app allows you to select switches you want to be turned off automatically. Hubitat app that turns off your devices after they have been on some time.
