How to override MQTT value?

Hello !

I lost my connected socket so I bought another one, I would like to keep the history of energy consumption but I cannot override that of the new connected socket.
Every time I set the “energy” value it overrides as soon as there is new data:

How to override energy value and keep it ?
Thanks

Most power plugs can’t set energy value, just reset it to zero. In that situation I would create template sensor which simply adds your previous value to energy state of the plug.

1 Like

Ok thanks @IgorZg I think the solution is to create template sensor like you said

:slightly_smiling_face:
Why don’t you marked it as solution then?
:slightly_smiling_face:

Sorry i’m new I don’t know how to do that xD