I am setting up my first ever automation so be gentle with me.
I have a numeric sensor that triggers the automation when a value from a sensor has been within a certain interval for an hour. It works great except for the fact that it keeps on triggering every hour as long as the interval is within limits. I would like to add some kind of condition to say that it should only trigger again if it has not been triggered for 24hours.
Can I condition based on last triggering of an automation? How?
- id: '12345'
alias: Pellet level warning 50%
trigger:
- above: '0.7'
below: '0.95'
entity_id: sensor.ultrasonic_sensor
for:
hours: 1
platform: numeric_state
action:
- data:
message: Det är cirka 50 procent pellets i tunnan
service: notify.slack_notify
Would you mind sharing your code?
Please see the blue box at the top to make sure it’s formatted properly - otherwise subtle details like spacing, etc. might be lost.