It’s not a caching thing Petro. When I write “I can assure” of course I tested such simple things (and reset the frontend cache, restarted HA etc.).
Just to add onto this one:
Yesterday I replaced my energy sensor, made using BT_Home that reports the kWh of my utilitymeter, it was called energymeter.
The new should also be called utilitymeter, so I first added the new to BT_Home, saw it worked, and then I started the renaming process.
Renamed the old, renamed the new to the old name… all fine.
But then I got the great idea to just delete the old, cause Energy wasnt just relying on a sensors history? wouldnt be that stupid, would it ?
Deleted the old one, and now all my old energy data, kWh and cost data is lost, no where to be found, even SQL data is gone.
Whoever made the energy page, should have parsed the data from alle the sensors into different entities for energy only, instead of combining a lot of different data into a simple page. It makes stuff like sensor migration a headache !
I have now passed my utilitymeter sensor through a template sensor, to decouple it from the actual sensor, but what a stupid implementation in the first place!
Hi everyone,
I’m now facing this issue.
I’m from Italy where we basically have 3 energy time slots during the day (and holidays):
- F1 from 08 to 19 (the more expensive)
- F2 from 07 to 08 and from 19 to 23
- F3 from 23 to 07 (the less expensive)
I then created 6 different energy sensors
- 3 sensors, one for each time slot, for energy bought
- 3 sensors, one for each time slot, for energy produced/returned from photovoltaic
I started monitoring these values since November 2023. I then discovered that in Italy a 10% usage is added for “energy loss” from the company. I checked my energy bills and in fact there’s always a discrepancy of roughly 10% from what my ShellyEM is reading and what is billed by the company.
Now the question:
I created 3 new templates, based from the 3 energy consumption sensors, that add 10% to the value. I want to replace the original 3 sensor with these 3 template sensors without losing historic data.
As you can imagine, I cannot delete the original sensor since the templates are relaying on those.
Anyone that can point me in te right direction?
Thanks in advance
I have the same problem, I want to store the old consumption.
I exported the consumtion into a csv file.
Is there a way to create a helper where I can import the data from CSV and add this helper to the energy dashboard? that would be the easiest solution for me
Hello, I have followed the steps on the top post and all has gone well.
I was exchanging a faulty smart plug with energy monitoring, all data has stayed behind.
Thanks!
See my solution for a similar use case
Hello @petro, i’m in a similar situation but I think more complicated.
I just installed a new solar system, so I can’t use anymore my previous “sensor.general_energy” cause it’s a Shelly EM and he will measure the negative datas from now on.
What I done here is creating a new sensor filter:
sensor:
- platform: filter
unique_id: "6e576f20-4621-4637-b603-71432c71e813"
name: "Generale Positivo Power"
entity_id: sensor.generale_power
filters:
- filter: range
lower_bound: 0
An then a new Integral for calculating the right grid consumption.
Now my problem: i can’t delete the entity cause it comes from an integration.
How can I proceed?
Thanks!
ok, also new energy meters here, i want to have the new entity names in ùy energy dashboard, my old gas meter is still online
if i rename my old gasmeter
like sensor.gas_meter to sensor.gas_meter new, it doesnt work, and my dashboard complaints statistics cant be found …
how can i keep my old history, using new entity names? why are statistics not renamed with the old sensor that i rename?
Which integration provides your entities? Do they have the correct state class by default, or did you add it via customisation?
i had before the smappee, now i use homewizard
deleted the integration, left the entities still there, now i see this, but its ok
renaming didnt work…
the hourlys were the old ones, i just leave them there now…
Are you sure the new sensors give energy and not power? Show their units and state classes, please. You can do this under the dev tools > states tab.
but its not related to my new integration
actually i just wanted to rename my old sensor names to other ones, even that doesnt work
if i have in my dashboard just 1 working entitiy like:
sensor.grid
sensor.return_to_grid
sensor.solar
and i want to rename then to:
sensor.grid_new
sensor.return_to_grid_new
sensor.solar_new
even that doesnt work