I don’t know where are you from, but in the middle of the night those entities are not going to show up until there is PV production and battery charging, etc…
We have no idea how you set up your gas meter in the configuration.yaml, but I believe you are in lack of understanding how you should manually configure things in the configuration.yaml, and that causes your issues all over.
Sure. Id probably do a automation that works like a hysteresis logic. Like
on-branch
turn on above water heating power + ~200 W
delay for ~ 10 minutes to avoid switching too often (If your water heater doesn’t do that by itself)
off-branch
turn off on below 0
delay again
Symos (and probably others too) provide that kind of logic out of the box with their IO Ports. So maybe you don’t need HA at all for that kind of thing.
When checking the sneosrs they show the following values:
sensor.total_photovoltaiik: 101,13
sensor.total_batterie_entladen: 0,21
sensor.total_batterie_geladen: 110,46
My advice to anyone still struggling is to go into the integration for each of the Fronius Devices, Turn on any of the “entities not shown” then use ADD TO DASHBOARD to send all the entities to a new dashboard
Then from this dashboard it is much easier to find and match entites to the fronius live view and the energy management screen
The lovelace config is for the live view is:
- title: mirror
type: panel
path: mirror
badges: []
cards:
- type: horizontal-stack
cards:
- type: custom:power-flow-card
title: Energy distribution Now
kw_decimals: 2
entities:
battery: sensor.solarnet_power_battery
battery_charge: sensor.byd_battery_box_premium_hv_state_of_charge
grid: sensor.solarnet_power_grid
solar: sensor.solarnet_power_photovoltaics
inverted_entities: null
- title: Energy distribution Today
type: energy-distribution
link_dashboard: false
And my configuration.yaml settings
template:
- sensor:
- name: "Battery Power Charging"
unit_of_measurement: W
device_class: power
state: "{{ max(0, 0 - states('sensor.solarnet_power_battery') | float(default=0)) }}"
- name: "Battery Power Discharging"
unit_of_measurement: W
device_class: power
state: "{{ max(0, states('sensor.solarnet_power_battery') | float(default=0)) }}"
- name: "Power Photovoltaics"
unit_of_measurement: W
device_class: power
state: "{{ states('sensor.solarnet_power_photovoltaics') | float(default=0) }}"
sensor:
- platform: integration
source: sensor.battery_power_charging
name: "Total Battery Energy Charged"
unit_prefix: k
method: left
- platform: integration
source: sensor.battery_power_discharging
name: "Total Battery Energy Discharged"
unit_prefix: k
method: left
- platform: integration
source: sensor.power_photovoltaics
name: "Total Photovoltaics Energy"
unit_prefix: k
method: left
could you please tell me how I can get the daily distribution? I’ve followed your instruction and created the new dashboard, but i don’t know what I should fill in for the daily distribution
hello, great script but unfortunately something is wrong with me in the HA.
I draw as much power into the battery as I take out of it.
Where is the error?
Could someone please provide a complete instruction that I get the Fronius Gen24 to work with BYD battery in home assistance. the instructions above do not work.
I was so glad that somebody already worked on that. Thank you @csett86 !
I have a SymoGen24 and just installed BYD batteries.
Solar panel production data is already available from the inverter.
I’m struggling to have the right Power Charging et Discharging entities ready for the Battery system configuration for the Energy Dashboard.
But the list is not suggesting the new power entities. I guess the units are not the one expected.:
Is it just a matter of waiting as the entities were just created or should I adjust anything?
edit:
Hi guys,
I went through the whole thread and the point about difference between Power and Energy and the comment about the helpers … helped me a lot:
I created helpers of type “Integration Riemann” and provided the Power Dis/Charging sensor mentioned above and the Energy entity was created:
I have set up my Energy dashboard and at first glance everything is working. But on closer inspection, I got out of the battery about 18kWh (in 364,5kWH / out 382,8kWh / month) more than went in. Does anyone have an explanation for this?
It is not always the same. There are days when the two values are identical. But there are days when the values are completely different. Per day, of course, relatively little, but in total it makes a difference. Especially when the daily values are combined into weekly or monthly values.
I noticed that the battery is normally only charged to 7%. Now I have noticed that sometimes during the night the battery is charged to 3-4% and then charged again during the night to 7%. Therefore, I can currently imagine that the difference comes from “charging at night”. What do you think about my theory?
Also, I had not created the total solar generation sensor in yaml. Now I have done so and I am curious to see whether this might contribute to the improvement or not.
What seems not a coincidence, is that the difference you get from in an out is the size of your battery: 18kWh.
If you started measuring since the beginning and you installed and fully loaded battery, then it seems correct that you will always have the extra 18kWh that you got from the beginning.
Does it make sense to you?