#Repurpose Device

1 messages · Page 1 of 1 (latest)

cunning dagger
#

I have a Shelly Plug that used to track my ebike consumption / charging. I now would like to repurpose the device for something else.
What is the best procedure to not mess around with history data? If I simply rename it, my historic consumption would no longer show up as "ebike", right?

visual rivet
#

what do you mean by not mess around?

#

if you rename your entities the historical data (long term statistics) will carry over

versed garden
#

I use helpers to hold the consumption/charging that I want to show on the energy dashboard and then use the plugs as input to the helpers. That way if anything happens to the plug or like in your case you want to reuse it the helpers data is preserved.

cunning dagger
#

@versed garden I manages to mirror the current data for power, that works well. How do you do in for energy? You somehow need to reset the data. {{ states("shelly.plug1" - <value_at_time_of_repurpose>}} ?

versed garden
pseudo flint
#

I think you don't need any helpers. What I would try to do is just delete your current entity.
Then reintegrate the device as a new entity.
All your statistics from the old entity_id will remain in the db indefinitely.

#

you can rename the current entity_id to something like 'sensor.ebike_legacy' before you delete it if you want a different name, as the statistics will just follow the entityid rename.