How to detect if my sensor is down

I like to test when my smartmeter sensor is down. I have a P1 smartmeter module that send every 10 sec the values with mqtt to home assistant.

That is working fine.

Now I like to send a whatsapp if my smartmeter is down for 2 minutes. This 2 minutes is just for example.
If my smartmeter module is out ( not sending any information ) then the last sent value stay the same.
So if the value is not changing for 2 minutes then I like to send a whatsapp.

Sending a whatsapp is not the problem, I don’t kow how to test if the sensor is down.

I don’t know where to start to make that automation, can somebody point me the right direction.

Hi, does it happen that the sensor is failing?

If so, how is it communicating (connection) to your system/network and is it not registering any data of not sending?

1 Like
trigger:
  - platform: state
    entity_id: sensor.your_sensor
    for: "00:02:00"

This should be your trigger in the automation.
If the state of the sensor is not changed for 2 minutes (for example) then…

thanks, I will try this trigger. It works.