Add support for battery state of charge
See original GitHub issueAfter some research (as it does not seem to be documented by Huawei) I found a way to obtain the state of charge from the inverter. Here I found a reply pointing to it:
37004 - 1 register - unsigned integer - 1 decimal (so you have to divide by 10 to get the % value)
In record 37005 I get 1000 as value so my guess is that 37004 is the soc and 37005 is the range (so % may be (reg[37004]/reg[37005])*100… however just dividing by 10 seems safe enough and requires just one call.
As huawei-solar python library does not return such information as named register I made a custom modification in my home assistant installation by creating a new attribute in sensor.py file this way:
self._storage_soc = int.from_bytes(self._inverter.read_register(37004, 1), byteorder="big")/10
And now I am getting the percentage of charge so I can use it on my cards

I am not making a pull request as probably the correct way to add this should be to add the record to the huawei-solar python library first but I am opening this ticket to provide all the information I have
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:13 (9 by maintainers)

Top Related StackOverflow Question
Hi, I got the latest modbus definitions from Huawei, the extra battery definitions are in there so we don’t need to guess 😃
This is supported in the latest version