How to make a automation that compairs an entity and a helper

Hi, I like to compare an sensor value with a helper value.
The sensor value comes from a esp32 that is connected with mqtt to home assistant. Sometimes the esp32 is not connected anymore with home assistant and then the entity does’nt change anymore.

So, I like to compare every 20 minutes if the sensor value now is the same value as in the helper. Is it different then put the value now in the helper value. Is it the same, give an error. ( like a whatsapp that the sensor is down => sending a whatsapp is already working) .

But I don’t know where to start how to compare the 2 values. Is there some help?

So you want to know when the sensor hasn’t changed in the last 20 minutes? You can do this with just a entity trigger for that sensor and put 20 minutes in the for section. As long as the sensor keeps changing, it will never fire. Once it has stayed the same for 20 minutes, you’ll get an alert.

Ok? I’m making it to difficult with the helpers … thanks, give it a try.

Thanks, it is simple and working.

1 Like