Just released a new 0.5.0 version that will solve the currency issues. It will now use the Home Assistant default currency and that should solve the issue for everybody. I think it’s better than asking user to define the currency in the integration because probably HA locale has been set right by everybody.
A question has anyone installed or using it with a variable cost for the “Electricity price Sensor”?
Trying to avoid configuration of a static entity with the supply price, as I have a sensor with the dynamic price as published by my electricity provider.
The supply price can change every 30 minutes, but remains stable for a couple of hours everyday, so a static entry won’t really work for me.
Great work!
I have used version 0.1.0 with my EV charger and just updated to 0.5.0 via custom repo in HACS.
That created new entities with (in my case) 0 SEK, an manual update replaces also all files as I’m aware of. Is there a way that consumed energy can survive an update, or did I missed something?
If not, do you think there is possibility to write data to a separate file that is created by integration, in that way file will not be overwritten by update and consumed amounts will preserve.
Yeah, about that. Could you please add the possibility to define currency anyways. I get my hourly prices from Nordpool in cents/kWh, while my default currency is EUR, so…
As I am not a programmer this took some testing to put together correctly. I hope it may be useful for others. The variable price of power in Norway (per kWh) is made up of two parts, the energy itself and for use of the grid. The energy price change every hour, the grid use has a low and a high price, depending of time of day and if it is a workday or not. The energy price is simple - i get that from an integration (Tibber or Nordpool). The grid part I have to add myself, and this Template sensor does the job for me, with two helpers “input number” to make it possible to change the price when updated without editing yaml code. Finally I use a helper that sums the two parts, and that is what i use in Dynamic Energy Cost.
This is in my sensor.yaml file (can also be in configuration.yaml):
Hi, I set the integration up yesterday to run overnight and I’ve got a result that doesn’t like up with what I had expected. It must be a configuration issue on my part as the produced cost graph follows the same curve as the kWh consumed graph:
Clearly I made some configuration error initially. I went through and deleted the original entities and reconfigured the integration using a kWh sensor. The new entities populated with the existing bad data but last night the daily sensor reset and now shows a much more sensible number of £0.32 kWh usage. I will manually reset the weekly, monthly and yearly entities and start fresh.
Thank you for sharing your project. This is what I was looking for and tried to configure multiple times. I am not sure if this issue is caused by the sensors or a mistake in the code. After each reboot:
I use a sensor that tracks the lifetime counter in kWh. When setting up the integration, it starts counting from that point onward. However, if there is a reboot of Home Assistant, it calculates based on the real counter instead of the delta from when the integration was set up.
I installed this addon recently and added my devices and linked them to my P1 meter, which are filled in with day and night rates via the Energy tab.
Most of the devices do not have much correct prices because then the electricity would be very expensive.
I am slowly switching from Homey to Home assistant and in Homey there is an app called “Power by the hour” that I use.
When I compare the data from Dynamic Energy with Power by the hour in Homey I see big differences and I know that the app works well when I compare it again with what I see in my Homewizard P! meter software.
My P1 meter automatically changes to rate 1 and 2 at 23:00 and 07:00.
I have also tried it with a utility meter that set the two rates via an automation at the correct time, but in both cases the result is the same and incorrect.
Attached are some pictures to make things clearer.
What am I doing wrong?
This is how I have it set up and have tried both options. Which one is correct?
Is there a way to change the price sensor in an existing configuration? My Nordpool sensor changed the naming for the zones, thus the name of the sensor changed as well. I could setup a new sensor, but then I do not have the old data anymore.
I think this is kind of a weakness of Home Assistant, but I don’t think that will change anytime soon.
This will not help you now - but a way to avoid the same problem later. Take a look at what I wrote in this thread aug 24. I have created a helper that sums grid tariff and energy price and use this helper as the price sensor in Dynamic Energy Cost. If there are changes to either grid tariff or energy price sensor I can update the helper without loosing the history.