Set state in action of automation

Hello,

when I go to “/dev-state” and set a custom state, I can use this in my condition of an automation.
But I want to set a state in “action” of an automation.

The idea is that my humidity shall only notify me > 60 and < 60. But now if humidity changes like this
61 (notify)
60
61 (notify)

So I get two times in a row the same notification. (60% is a buffer)
What I want to do is this:
61 (notify, set custom_state to “above”)
60
61 (check if custom_state is “below” and only then notifiy me).
60
59 (check if custom_state is “above” -> notifiy me; set custom_state to “below”).

Thank you

2 Likes