wlcrs / huawei_solar

Home Assistant integration for Huawei Solar inverters via Modbus
GNU Affero General Public License v3.0
528 stars 83 forks source link

[Bug]: "Add support for user-defined extra sensors" seems to be out of date #769

Closed BradleyFord closed 1 month ago

BradleyFord commented 1 month ago

Describe the issue

I am struggling to replicate due to the large number of underlying code changes, if is possible to update this commit to be a better reflection of the current changes require?

https://github.com/wlcrs/huawei_solar/commit/f2b98c90fac767d2d837e81b5b8f4ecfaf480464

Describe your Huawei Solar Setup

Inverter Type: Inverter Firmware version: sDongle present: Yes / No sDongle Type: sDongleA-05 (WiFi / Ethernet) / SDongleA-03 (4G) sDongle Connectivitiy: WiFi / Ethernet / 4G sDongle Firmware: Power meter present: three phase / single phase / no Optimizers Present: Yes / No Battery: LUNA2000-SO xxkWh / LUNA2000-S1 xxkWh (Released 2024) / LG RESU xxkWh / None Battery Firmware version: Huawei Solar integration version:

How do you connect to the inverter?

Via the SDongle, wired connection

Upload your Diagnostics File

Drag & Drop your Diagnostics File here.

Upload your relevant debug logs

none

Please confirm the following:

Roving-Ronin commented 1 month ago

@BradleyFord if its of assistance, have a look at this current pull request: https://github.com/wlcrs/huawei_solar/pull/768 This was adding 5 sensors (and removing 2 that give incorrect readings). With the Library ( https://github.com/wlcrs/huawei-solar-lib ) already defining these modbus registers, it is a matter of adding them into the sensor.py, strings.json and language files. You do need to keep the sensors in the same order as the corresponding register for them is listed in the library.

wlcrs commented 1 month ago

I've removed the outdated branch and did a small update to the wiki. But mainly, as Roving-Ronin said: look at #768 to see how you can add extra sensors.