How2 - JacobsenKim/ha_huawei_solar_replicate GitHub Wiki

How2

Replica power sensor, read source, from target to show on target Home Assistant instance.

Testet on: HAOS = 11.4 # HAC = 2024.1.3

And: HAOS = 11.5 # HAC = 2024.2.1

!!! Always make sure to back up everything before you begin !!!

On source HA:

Ensure the following 3 things:

  1. Huawei Solar integrationen is running.

  2. The correct IP address of your source Home Assistant instance.

  3. Create new Token "YOUR_LONG_LIVED_ACCESS_TOKEN"

Token Name: huawei solar replicate

You’ll find the token-menu here:

Click on your username on the lower left corner in HA, then in the top, click on security scroll down to the bottom.

http://homeassistant:8123/profile/security

On target HA:

Only 5 steps to do on target:

  1. Copy this file "packages/huawei_solar_replicate_target.yaml" to target Home Assistant instance "packages" folder, if you dont have "packages" folder, one need to create "packages" folder.

  2. Open "packages/huawei_solar_replicate_target.yaml" in file editor.

Use the "search" and replace in HA file editor, here are what to search for.

  • Source IP: 192.168.10.24

  • Source Token: YOUR_LONG_LIVED_ACCESS_TOKEN

Once you've replaced with your Source IP and Token in huawei_solar_replicate_target.yaml, and verified these details, this setup should work as intended.

  1. In "configuration.yaml" add:
homeassistant:
  packages:
    huawei_solar_replicate: !include packages/huawei_solar_replicate_target.yaml

Skærmbillede fra 2024-02-12 00-01-12

  1. Then save and restart Home Assistant.

  2. Add Lovelance card

Lovelance card:

Skærmbillede fra 2024-02-10 13-59-57

type: entities

entities:

  - entity: sensor.battery_charge_discharge_power

  - entity: sensor.battery_day_charge

  - entity: sensor.battery_day_discharge

  - entity: sensor.battery_state_of_capacity

  - entity: sensor.inverter_active_power

  - entity: sensor.inverter_daily_yield

  - entity: sensor.inverter_input_power

  - entity: sensor.inverter_input_power_2

  - entity: sensor.power_meter_active_power

  - entity: sensor.power_meter_consumption

  - entity: sensor.power_meter_exported

title: Huawei Solar Replicate Sensor

view_layout:

  position: main

show_header_toggle: false

state_color: true