#Prevent History in Energy Dashboard while changing sensors

1 messages · Page 1 of 1 (latest)

compact sierra
#

My Energy Dashboard contains history since 2021.
Currently my sensors for Grid consumption and feed-in coming from a Shelly 3EM. I used the native Shelly L1, L2 and L3 sensors behind utlity_meter to track different tarifs. For feed-in I used the native Sensor which the Shelly integration is providing for L1, L2 and L3.

Recently I installed a PV battery which made some changes in the Homeassistant Energy Dashboard necessary.

The Shelly 3EM will not be used anymore (while it is still running and providing measures to HA). A Fronius SmartMeter is now collecting the correct information. The new Fronius SmartMeter doesn't provide the Energy separatly for L1, L2 and L3. It just provides a sensor with "positive consumption" (consumption from grid) and "negative consumption" (feed-in).

What I try to achive is to:

  • prevent the existing history but stop collectin data from the current sensors
  • from now on, only use the new sensors to collect the statistics from now on

What I've tried already:
For the L1, L2 and L3 in consumption area I had the idea to use a "dummy" sensor which is always 0 kWh and use it as input of the utility_meter. So from my point of view, this should result that the used L1-L3 sensors do not increase anymore.
But how to deal with the feed-in where the native Shelly sensor was used?

I read the FAQ (https://gist.github.com/langestefan/acbf7e42b15b302e9aacc08663039e57) but didn't get it how I could solve my issue.
When I disable the sensors L1-L3 in the Shelly integration, I can't rename the Fronius sensor to the same name, as the new sensor is just one. So there are not 3 sensors anymore.

Any Ideas?

Gist

HA Energy Dashboard FAQ. GitHub Gist: instantly share code, notes, and snippets.

onyx isle
#

This has a couple of issues which need a bit of magic to work

#

What you want to do is move the L1/L2/L3 statistics to a template sensor each. Unless you do the magic directly in the database you will effectively need to remove and add the Shelly again which will reset it's history but I don't think this will be a problem. Those templates don't necessarily stick to a real device so you can leave them untouched with the previous history and assigned on the energy dashboard, replacing the Shelly ones

compact sierra
# onyx isle What you want to do is move the L1/L2/L3 statistics to a template sensor each. U...

I think I had this idea too this afternoon.
I've created a template sensor with the same name and just the last valid value from the real shelly. I've deleted the Shelly from the integration in the UI, restarted HA and then inserted the prepared template sensors.
After that I rebooted HA again.
Now I've a template sensor with the old statistics and I just added the new to collect now from there.
So far, so good. Did that for the others (feed-in and PV generation) as well.

What I now have is that for the feed-in the money shows 0 😦

onyx isle
#

I'm not sure how the monetary calculations are attached to the statistic

#

You may need to move them to the template sensor as well, but not exactly sure about the quirks on that

compact sierra
#

It is strange as for the consumption it worked well. Only the feed-in is empty.
Not sure if this is lost 😦

compact sierra