#notification actions rerun automation

1 messages · Page 1 of 1 (latest)

tardy mauve
#

Hello,
I am looking to create an automation where

  1. Coffee Machine smart plug is on
  2. Timer starts 45min
  3. Once timer finished ask my phone to keep on or turn machine off
  4. If turn off, toggle switch to off (this part works)
  5. if stay on, either rerun the sccript and start 45min timer again (or bonus if I could change timer to 15m and start script again)

Any help appreciated.

merry nest
#

Ok, so what I'd do is an automation with 2 triggers with different IDs

  1. Numeric State trigger pointed at your smart plug or however else you want to do 1 "coffee_turn_on"
  2. Time trigger pointed at a datetime helper (input_datetime.coffee_timer) called "countdown_done"

You then have a choose action to split it up based on the ID
Choose: "coffee_turn_on"
Set input_datetime.coffee_timer to now() + timedelta( minutes = 45)

Choose: "countdown_done" and the coffee machine is still on (in case you manually turned it off at some point)
Send a notification to your phone with a url to a dashboard with a button on it input_button.extend_coffee
Wait for trigger: state - give it an id of "extend_coffee" and a timeout of say 5 minutes
if trigger id = extend_coffee - set input_datetime.coffee_timer to now() + timedelta( minutes = 15)
else turn off smart plug

tardy mauve
#

trying to setup as you said but im getting really confused with so many nested choose/if actions.