I have sauna in my house where I installed temperature sensor to monitor when sauna has reached wanted temperature.
I would like to have notification in to my phone when certain temperature is reached and I can go to sauna.
I’m having trouble setting automaton trigger for this. I understand that I must check for numeric state of the temperature sensor and check for when it’s above temperature I like. I don’t understand how to do it in way that trigger fires only one time (when temperature is reached) and does not trigger again when temperature drops after sauna has been turned off and when temperature keeps rising when using sauna.
If someone could nudge me to the right path I would appreciate it.
You could use an input boolean and make the state of that one of your conditions. Then when your done with the sauna you can just manually flip the boolean switch.
I’d have the automation trigger a script that includes a delay (say 10 min). Then use the state of that script as a condition of the automation (test to see that the script is ‘off’). That way it’ll fire once, then can’t fire again for 10 minutes. Lengthen the delay as necessary.
And if you take those two ideas and combine them into one, you can have that delay determined from the value of a slider or drop down list. Shoot, you could even have it trigger another automation that blinks a light within view of the sauna to make sure you don’t end up like the guys in the World Sauna Championships!
(I’d link that but it’s kinda of a brutal story… people competed for how long they could stay in a sauna and some literally got cooked to death.)
Not bad ideas, but again, these involve me doing something manually and I would like to avoid it I’m not always sure how long I’m going to be in sauna beforehand: sometimes it’s like 15 minutes and sometimes World Sauna Championships!
(Just kidding, sauna is for relaxing, not for cooking yourself to death. But still I like to be there random amounts of times.)
My suggestion doesn’t involve anything manual. The automation triggers when you reach target temp. You use the delay script to “debounce” so that you don’t keep getting triggers. Set it for an hour if you want - that way you only get at most one notification per hour that the sauna is ready.
Yeah, you’re right that it does not involve manually work beside setting some default value. I can see it could work nicely with pretty long delay (then it would not even trigger again after sauna has cooled down again below triggering point).
ih8gates, could you be so kind to provide example how to check for state of the script? I undestand how to set up the script and delay for it, but I have no idea how how check if it is already running or not.
Not sure if this will work for you. It assumes you only use the sauna once a day.
Have an automation that triggers via numeric state from your temperature sensor when it is above your set temp. Actions would be to notify you and also to turn off the automation. (not sure you can turn off an automation from inside an automation but worth a shot, I turn off automations from another automation but not the same automation)
Then write another automation to turn the automation back on after midnight each night so it is ready for the next day.
This does’nt look like a bad solution. I don’t usually use sauna more than once a day max so this could work. It’s good to know that automations can be turned off in demand if necessary. Thanks!
Again, just to be clear, not sure how HA will like turning off an automation from within the same automation. I do it to control other automations this way but not within the same automation. If it doesn’t like the automation route you can always have it trigger a script or something similar which turns off the automation.
Which gives me another idea.
Instead of calling the automation off, call a script. If you know you never sit in the sauna for more than an hour or two hours just call the script and put in a delay for a set amount of time which will turn the automation back on after the delay. This would allow the automation to work after a morning session if you wanted to go in the sauna at night again.
You just use a normal state condition or trigger. The state of a script becomes ‘on’ when it’s running. If the script contains a delay, it’ll revert to a state of ‘off’ when it’s done.
- condition: state
entity_id: script.some_timer
state: 'on'
It definitely is useful in the right situation and use case. I was going to use this method in my mailbox notification automation so that it would only trip the one time when the mailman opened the box to put the mail in instead of twice (when I went to open it).
But after I thought about it for awhile, I couldn’t account for times when I might be away from the house for most of the day so I ended up sticking with an input boolean toggle. While it’s working, I may end up going back to this so I can do it with a single automation instead of two.