Trigger Automation once a day / every X hours

Hello,

I have a Rainmeter/gauge to track how much water comes down. It will get triggered every 0.3mm of rain, so when there is a pour it’s quite often fired.

The first time the Rainmeter detects rain, it should give me a notification. But after that ignore for at least 5 hours.

I found a solution that goes with a condition template:

condition: template
value_template: >-
  ‘{{ as_timestamp(now()) -
  as_timestamp(states.automation.regenautomatik.attributes.last_triggered) | int
  > 1800 }}’
enabled: true

When I enter the code between ‘’ under Developer tools it works depending on the time.

But when I create my automation like this

it never becomes true, hence automation never fires.
What did I do wrong?

As I cant see your full template I can only comment on the one posed in text. There are a couple of things wrong with this template:

value_template: >-
  ‘{{ as_timestamp(now()) -
  as_timestamp(states.automation.regenautomatik.attributes.last_triggered) | int
  > 1800 }}’
  1. It is surrounded by quotes. Do not quote multi-line templates.
  2. Even if it was a single line template (which should be enclosed in quotes) they are the wrong sort of quotes. Use ' ' or " " not ‘ ’.

Edit: also 5 hours is 18000 seconds. Not 1800.

I tried to remove the quotes completely and it works. Thank you