Huawei inverter - daily yield attribute

Hi,

I added my new Huawei inverter to Home Assistant, and successfully set up the HACS integration: GitHub - wlcrs/huawei_solar: Home Assistant integration for Huawei Solar inverters via Modbus

Now, I want to send a daily push notification containing the yield of energy of that day - and here the problem start. What I tried in the action part of the automation is:

service: notify.all_devices
data:
  title: PV
  message: 
    Heuter Ertrag: {{ state_attr('sensor.huawei_wechselrichter',
    'DAILY_YIELD_ENERGY') }}

But that does not work, and to be honest, I have no clue where I could find the attribute name (DAILY_YIELD_ENERGY is only a guess looking at some code files).

Can someone help or point me to a way how I can find out about available attribute names? Thanks!

There is a sensor already for the daily yield

So this should be enough (replace with yours)

Heuter Ertrag: {{ states('sensor.inverter_daily_yield') }}kWh

That gives me this:

Heuter Ertrag: 4.32kWh

1 Like

Yes, using “states” instead of “state_attr” did the trick… thanks!

You’re welcome, do you mind marking my post as solution? It will close the topic and help others to find the solution if they have the same issue. Thank you.

As additional info, go to the developer tools and in states tab, start typing the name of your inverter, you’ll see all entities and attributes.