To measure energy, the energy dashboard does a good job if:
- you have just a single tariff for energy cost
- you have solar energy which returns energy on all three phases. (Many users of HA have three phase power from grid)
For my case it does just not work well without a helper to correct for energy.
My setup: I use a Shelly pro3em to measure all three phase of grid.
Then I have a Balcony power plant (Balkonkraftwerk) which is putting in Energy but on one phase only. Now the gist:
If we have a little sun, there is energy less than on that phase consumed from the house, that means we use Power from all three phases. But when the sun is strong and powerful shining, then we have returned energy on phase 1, but even if we return energy on phase 1, we still consume energy on phases 2 and 3.
So we need an option in HA energy dashboard to define on which phase we have our power plant. Also we need to have formulas to correct energy consumption for the two cases I described above, using an entity who measures if we have positive value power on the phase of the power plant and use total power or if it is a negative value and we therefore need to use power adding phase 2 and 3 because phase 1 is not consuming.
Because otherwise it just thinks, that we return energy and therefore have no consumption which is wrong in a 3 phase grid with a single phase balcony power plant.
Here is my formula to have correct energy consumption:
For energy, grid consumption: (Power plant is attached to phase a)
{% if states(âsensor.shellypro3em_a0dd6ca1972c_phase_a_active_powerâ) | float(0) > 0 %}
{{states(âsensor.shellypro3em_a0dd6ca1972c_total_active_energyâ) | float(0) | round (4) }}
{% else %}
{{(states(âsensor.shellypro3em_a0dd6ca1972c_phase_b_total_active_energyâ) | float(0)) + (states(âsensor.shellypro3em_a0dd6ca1972c_phase_c_total_active_energyâ) | float (0)) | round(4) }}
{% endif %}
Another thing that needs upgraded is the energy cost part of the energy dashboard. There should be another option to select: 2 tariff option, where you then have an option to tell which time tariff 1, and otherwise its tariff 2. And then also to add the value of these two tariffs. For returned energy I have just a single tariff, but I donât know if there are other users who have the need to add two tariffs as well.
I did a helper using schedule to define tariff 1 and else tariff 2. Then I used another helper to state tariff value. Below is my workaround:
{% if is_state(âschedule.hochtarifâ, âonâ) %}
{{ states(âinput_number.hochtarifâ) | float(0) | round(4) }}
{% else %}
{{ states(âinput_number.niedertarifâ) | float(0) | round(4) }}
{% endif %}
Thank you.