#Moving from Flat to TOU Tariff and retaining historical data?

1 messages · Page 1 of 1 (latest)

brittle night
#

I have previously been on a flat tariff however the energy distributer in my state has recently moved to TOU so I need to change my HA setup to mirror it.

I have followed the docs on the utility_meter and successfully set up my tariffs including an automation to switch between them and I had a few questions about the Energy dashboard and the historical data.

Historical structure is Smart Meter Device -> sensor.grid_consumption sensor entity (ever-increasing Wh sensor) as the Energy dashboard "Grid consumption" entry.
New structure would be [peak,offpeak,shoulder] tariff entities with the sensor.grid_consumption entity provided by the Smart Meter as the parent/source of data for the new tariffs.

Obviously the new meters are based off my previous single consumption meter (sensor.grid_consumption) which was the primary energy reading.

  • How do I stop monitoring the previous single energy point and still retain all history for it?
  • If I just remove it as a source in the energy dashboard configuration, will it gracefully keep the long-term statistics for it visible in the dash?
  • If not, how do I go about retaining that detail - because I don't want to lose that history.

I previously used an input_number as the source for the rates and would change it when my rates changed. I see that there's a fixed rate in the energy config now. Is this cost written down into the database when writing the usage too, thus "rendering" the kWh * cost out when it's written down? Or is it calculated retroactively when it changes?

elfin marten
#

Cost is written into the database. Check cost_* entities

#

You can carry over statistics that the energy dashboard uses from your original entity to one of the new entities created by the utility meter

#

You have to change the entity ID of the new entity to be identical to the old entity

brittle night
elfin marten
#

Yes

brittle night
#

That hasn't worked. That seems to have just destroyed my history. This is a day 3 days before the new sensor was created. Obviously the Peak/Offpeak wouldn't have data so the 0s are expected, but the Total Consumed should.

#

Steps taken:
Create 3 new tariffs, add the Peak and Off-peak tariffs, rename the entity_id of the old consumption sensor to a different entity_id, rename the new Shoulder tariff to the old "Energy - Total Consumed" entity_id.

elfin marten
#

I did not tell you to rename the old entity id

#

The old entity has the statistics

brittle night
#

You cannot have two entities with the same ID, so how are you supposing to achieve that?

brittle night
#

Yes... again - how do you propose to re-use the old entity_id without first renaming it to something else?

elfin marten
#

delete the old integration first

brittle night
#

The integration that is providing the consumption for the new tariffs as outlined in the original question? I think you may have missed that.

#

As stated, the previous consumption entity is the inverter's full grid consumption. With the new tariff entities all being built off that.

elfin marten
#

I am not missing anything

#

you have a new entity, it has to be renamed to the old one.

#

If the old entity is blocking you from renaming something, delete it

brittle night
#

Yes, you really are. The old entity is the parent for all 3 new entities. Thus, it cannot be "deleted".

#

Fronius Integration -> Smart Meter Device -> Grid consumption entity -> [peak,offpeak,shoulder] tariffs.