Found a few threads about this but nothing that worked for me unfortunately
I want to achieve this with an action in a automation, is it possible? all my roads ended up with creation of another sensortype that could be edited… but if it can be done in the developement tools it should be possible in an action right?
Sensors are designed to be changed by outside stimulus not controlled by the user.
My suggestion is to create a helper for the data type you want to change, and that you can change as needed.
Thanks for the answers, I know I have alternatives, I just want to avoid creating duplicates of everything, HA grows rapidly as it is either way… And I can change the value fine by doing it through developement tools so apparently it is possible to change values of sensors. This is a template sensor that works fine but I want a reset every midnight somehow. If it ain’t possible I’ll consider making another helper for this. Not a big issue really, it would be nice to manage tho