I have a custom sensor that reads the max temp of my pool so I can see how warm if got over the day. The sesor it reads that from occasionally gets a strange spike and hits 999 deg. So I wanted to see if I can use and automation to reset that max temp back to 0 so it will get a new value from the sensor again.
I have built and automation but I cant find an action to run to change the value. Is there a service call that I can use that anyone is aware of?
Pretty much I want it to do the same as me jumping in the dev tools and manually setting it to like this:
Or as Hellis says, use a template to reject the unwanted states either in the integration value_template if it supports one, or with a template sensor.
You could easily set if outt < 75 or 31. But you could also look at the change from previous value to current value.
Setting a hard coded value might become ans issue but if the change when you get these wrong values are always 25 → 999 then it’s quite easy to filter out.
If it was 25 → 26 → 29 and so on then it could be harder.
How is this custom sensor integrated into HA? If it’s an ESPHome device, there are built in functions to filter out values directly on the device without having to rely on HA to do the filtering.
its a custom shelly uni project I built myself that monitors my pool, solar tubes and the water return temp. Its very basic and doesnt have options like that.