Years ago I made a derivative sensor the zeros over time with no changes. It works. I’ve tried to make a new derivative sensor doesn’t work like the old one. Where is the code hidden for the old sensor and can I just copy it instead of trying to figure out why the new helper does not give any option to give the correct info my old sensor does?
Where is the helper code stored for current derivative helpers?
Is the old config not stored in the configuration.yaml or sensor.yaml?
I didn’t see it there… I was hoping to see it there.
It is somehow integrated with the device that it’s derived from, meaning it shows up in the ESPhome device entities as made from the esphome code… Defiantly not in the esphome code though:(
Were they maybe converted to the UI with one of the previous releases?
Yes i’m pretty sure it was. The cool thing is that the sensor still worked as a derivative sensor. Not what ever the new helper helper creates.
What’s crazy is how old this problem is. Years now.
It is very likely that the solution to problem is not in the way you defined the derivative before. What changed is that the recorder no longer stores duplicate values when the state does not change. Combined with many sensors that only update when a new value is stored Derivative and trend being among the ones that no longer worked right after that for sensors that can remain stable a long time.
Ok… With me setting the value in Developer tools to different values over time, there’s still no way to set the proper scale and why have… time settings, if it’s not dependent on time anymore? seems like a bug. Thanks.
Do you know how to duplicate the old sensor that still works? Where is the code hidden that I could use to create a new sensor? with the correct options for scale and time updates?
Is there a help file for how the Derivative Sensor Helper is suppose to work? lol
My sensor is in kg… No option for that anymore… again I have a working sensor with the proper settings and timing. Just want a copy… Thanks for trying to help.
The difference may well be in how the base sensor behaves. If it goes to stable suddenly it works badly, if the derivative gradually changes to 0 it may work fine, or if there’s a timy fraction of jitter in the source it still works fine.
Setting values in the developer tools may or may not work to test the derivative, because those changes aren’t real changes stored in the recorder. So looking back over time, the derivative may not see what you did there. So it could also be the derivative works right but the problem is the way you test it.