hmm Just use it as i set it up a year ago and it was great since, no issues, thank you for the link will give it a go next time it gets broken
just out of curiosity , if both work why switch? is there any improvements ?
hmm Just use it as i set it up a year ago and it was great since, no issues, thank you for the link will give it a go next time it gets broken
just out of curiosity , if both work why switch? is there any improvements ?
Yes. There are a lot of improvements.
That it is not working in 2022.4 would be enough of a break, don’t you think?
yeah though so, but turns out the thing was due to serial number included in the sensor name. updated the name , so now it works with 2022.4.3.
not sure what kind of improvements needed as you get just reading from import export consumption production and like, as long as it is stable it does the job for me , long term stats are also valuable so dont want to have new sensor names
I will see if I can try the one you suggested. need some time to reconfigure all that … in good case scenario if the sensors names are identical if not will be a pain to reconfigure all the automation scripts and dashboards … so I try to avoid messing with it hehe
Ciao Carlo
I ask you for a kindness …
You could post your .Yaml code in full (obviously only for the sensors part) and related card code …
I’m trying to make it work but I’m sure the conversion of the data is wrong given the absurd values it proposes to me …
A thousand thanks.
As @dd77 mentioned here is his code to be pasted in configuration.yaml
template:
- sensors:
template_grid_feed_in:
friendly_name: "Solar 2 Grid"
unit_of_measurement: 'W'
device_class: power
value_template: >
{% if states('sensor.grid_active_power') | int > 0 %}
{{ states('sensor.grid_active_power') }}
{% else -%}
0
{% endif %}
# sensor used to show power flow from Panels to Grid and doesn't allow it to show a negative number only positive numbers
template_grid_consumption:
friendly_name: "Grid 2 House"
unit_of_measurement: 'W'
device_class: power
value_template: >
{% if states('sensor.grid_active_power') | int > 0 %}
0
{% else -%}
{{ (states('sensor.grid_active_power') | int) | abs }}
{% endif %}
# shows the solar power being fed to the house and doesn't allow it to show a negative number only positive numbers
template_curent_solar_consumption:
friendly_name: 'Solar 2 House'
unit_of_measurement: 'W'
device_class: power
value_template: >-
{% if states('sensor.template_grid_consumption') | float > 0 %}
{{ states('sensor.active_power') }}
{% else -%}
{{ (states('sensor.active_power')| float - states('sensor.template_grid_feed_in')| float) }}
{% endif %}
utility_meter:
grid_import_solar_daily_energy:
source: sensor.grid_consumption
cycle: daily
grid_export_solar_daily_energy:
source: sensor.grid_exported
cycle: daily
and for lovelace card
type: custom:tesla-style-solar-power-card
name: 'Power Flow '
threshold_in_k: 4
hide_inactive_lines: 0
show_gap: true
change_house_bubble_color_with_flow: 1
grid_to_house_entity: sensor.template_grid_consumption
generation_to_grid_entity: sensor.template_grid_feed_in
generation_to_house_entity: sensor.template_curent_solar_consumption
house_entity: sensor.house_consumption_daily
generation_entity: sensor.daily_yield
grid_entity: sensor.grid_import_solar_daily_energy
house_extra_entity: sensor.grid_import_solar_daily_energy
generation_extra_entity: sensor.daily_yield
grid_extra_entity: sensor.grid_export_solar_daily_energy
it will produce this graph
Thank you so much yousaf465
now I try it, I wanted to ask you missing the part for the battery ? I don’t seem to see it in the script
Many thanks again …
Hi!
Fyi.
The latest home assistant update finally includes a simple tool to adjust or correct data stored under “Statistic”. In our case for example it helps and make easier to adjust this exporadic issue related to spurius error measured data by grid sensor when a home grid outage/shutdown has taken place.
Have the same error. What did you do to get rid of this error?
duplicated mapping key at line 34, column 7:
friendly_name: “Grid 2 House”
Which code you copied?
Copy the last code in this post Integration Solar inverter huawei 2000L - #1620 by yousaf465
That’s indeed the one i’ve copied. So what’s wrong with it?
This is most likely an indentation error.
I am no expert in yaml, but I would advise using VS-code to edit the configuration.yaml file. https://code.visualstudio.com/.
it will detect many errors and avoid this mess.
here is my configration.yaml code
access HA from SSH, check configuration using the following command. it seems sensors haven’t been created yet.
ha core check
Hello yousaf465
It also gives me some problems with the sensors …, could you kindly still enter your code ayyually in use “.Yaml” there are inconsistencies with the names of the sensors
It’s not my code, it is @dd77’s code as mentioned in the above post. Integration Solar inverter huawei 2000L - #1608 by dd77
Friends help …
I tried it, but I just can’t get this card to work properly …
The values are not correct, the energy flows are not correct … I struggle to understand
I renew the question, there is someone who is kindly willing to post their own code (card + configuration.yaml) at least to have a starting point with the correct sensors (those used are from EmilV2), I have always been trying for 2 days with negative results and surely the English language does not help me …
sensor:
- platform: template
sensors:
template_grid_feed_in:
friendly_name: "Solar 2 Grid"
unit_of_measurement: "W"
device_class: power
value_template: >
{% if states('sensor.grid_active_power') | int > 0 %}
{{ states('sensor.grid_active_power') }}
{% else -%}
0
{% endif %}
# sensor used to show power flow from Panels to Grid and doesn't allow it to show a negative number only positive numbers
template_grid_consumption:
friendly_name: "Grid 2 House"
unit_of_measurement: "W"
device_class: power
value_template: >
{% if states('sensor.grid_active_power') | int > 0 %}
0
{% else -%}
{{ (states('sensor.grid_active_power') | int) | abs }}
{% endif %}
# shows the solar power being fed to the house and doesn't allow it to show a negative number only positive numbers
template_curent_solar_consumption:
friendly_name: "Solar 2 House"
unit_of_measurement: "W"
device_class: power
value_template: >-
{% if states('sensor.template_grid_consumption') | float > 0 %}
{{ states('sensor.active_power') }}
{% else -%}
{{ (states('sensor.active_power')| float - states('sensor.template_grid_feed_in')| float) }}
{% endif %}
this is the correct indentation, you will need to check in the dev. tools that you actually have the correct values in those sensors after restarting.
I also had similar problem with Emilv2 integration but in my situation I lose connection after upgrade my inverter to 141 firmware. When i downgrade to ver. 136 integration start to work although home assistant is 2022.4.5