Hi,
I would like to ask you for help with setting up automation. I looked through some older threads about this, but unfortunately I couldn’t get the automation set up properly.
The point is that I am using an ultrasonic sensor to measure the distance. If the value that the sensor measures (in cm) remains unchanged for a long time, I know that the sensor needs to be cleaned.
So I would need an automation that sends a notification to the phone if the sensor keeps measuring the same value for a certain period of time.
I set this up (10 minutes is for easy testing):
alias: Test
description: ''
trigger:
- platform: state
entity_id:
- sensor.ts_ft002_hladinomer_d
for:
hours: 0
minutes: 10
seconds: 0
condition: []
action:
- device_id: b217d35d300b78be20b279023bb2367c
domain: mobile_app
type: notify
message: Msg
title: Title
data:
ttl: 0
priority: high
mode: single
The notification appears if the value does not change for 10 minutes, but unfortunately it comes three times in a row. And this is repeated over and over. Sometimes every 10 minutes and sometimes even more often.
Please advise how to set it up better?