Status monitoring and URL calling

Hi, I need to create an automation, if the state of the temperature sensor does not change for one hour, then just call the URL 192.168.0.240/reboot. How can I monitor the functionality of a sensor and then simply enter the send URL? This address works as a “button”, if I enter it into the browser, it simply triggers a restart of the device, nothing more, nothing less.

Thank you
Ivica

You can probably use ping to se if it’s alive, probably better than “if temperature does not change”?
Then to open that webpage, use the rest command https://www.home-assistant.io/integrations/rest_command/

The problem is that the device does not stop communicating, but only collect and send data, so ping is not usable, the device listens, only reboot will help to continue data collection.

Ok…
So is this a device integrated in Home Assistant?

Does the temperature change enough to make the average of 1 hour change? If so you can use the statistics sensor that will create an average reading of 1 hour and if that is the same as current value run rest command.

It is quite helpful if you remove the wall and start talking… I mean it’s not fun guessing what the sensor is, how it works, how often it updates, such basic stuff that should be included in a question in my opinion.

I’ll bring it a little closer. I have a heat pump connected via VitoWifi in NodeMCU. It happens to me that NodeMCU gets stuck and for a few days I don’t have information from it and it decides to automate it. The outdoor temperature sensor from the heat pump changes by tenths of a degree every five minutes, so it is a reliable indication that everything is running as it should. If not, I want to call reboot.

Ok…
I just had a look at one of my statistics sensors. It might work.
This is what it gives you:


And that max age is the last time it got a reading.

So having this:
{{ as_timestamp(states.sensor.stats.attributes.max_age)+3600 > now().timestamp() }}

as template will return true as long as the last reading is less than one hour ago because the timestamp of max age +3600 seconds is more than the current timestamp.

And then just call the rest command when it becomes false. (or just add == false at the end to get the opposite of the template. (I think)