This code is a custom component to read the data from Huawei inverters
This is a custom component. Custom components are not installed by default in your Home Assistant installation. HACS is an Home Assistant store integration from which this integration can be easily installed and updated. By using HACS you will also make sure that any new versions are installed by default and as simple as the installation itself. Currently this custom component is not in the HACS repositories, in the HACS documentation you can find how to add a custom repository.
Copy the custom_components
folder into your HA configuration folder (if you already have the custom_components
folder, copy the huawei_solar
folder into it).
Then configure the sensors by setting up the huawei_solar platform in configuration.yaml
.
Name | Type | Requirement | Description |
---|---|---|---|
host | string | Required | hostname or ip address |
optimizers | boolean | Optional | Set to true if you have optimizers and want to see information about them. |
battery | boolean | Optional | Set to true if you have a battery and want to see information about it. |
slave | int | Optional | Set the slave unit, set slave = 1 when using the dongle. |
port | int | Optional | Set the inverter ModBus TCP port |
Example:
sensor:
- platform: huawei_solar
host: '192.168.0.123'
optimizers: true
battery: true
slave: 1
port: 6607
If you are using the SDongle to communicate with your inverter, make sure the following conditions are met
slave: 1
as described aboveIf it is still not working after that, restart the inverter and try again.
1.0.0
daily_yield
, total_yield
, storage_charge_discharge_power
, storage_total_charge
and storage_total_discharge
are now separate sensors instead of attributes.