How to activate a switch based on a previous activation

Hi there. I have a question.
This is the situation. In my garden I have a waterfall that is triggered by time and presence of people. If no one is present, the waterfall goes out. The waterfall has to turn on again when people are present again. But this is only allowed if the waterfall (switch) has already been switched on earlier that day.
Because (for example) in wintertime the waterfall has to stay turned off.
Can anyone help me with the right condition?

This should help. You want to use same day rather than ignore so change the > to <

Thanks! That helped,
For me the solution was actually very simple

{{ states.input_boolean.waterval.last_changed > today_at() }}

1 Like