Integration Solar inverter huawei 2000L

It’s picture-elements card.

elements:
  - entity: sensor.power_meter_active_power
    style:
      left: 27%
      top: 7%
    type: state-label
  - entity: sensor.active_grid_a_power
    style:
      left: 52%
      top: 16%
    type: state-label
  - entity: sensor.active_grid_b_power
    style:
      left: 52%
      top: 19%
    type: state-label
  - entity: sensor.active_grid_c_power
    style:
      left: 52%
      top: 22%
    type: state-label
  - entity: sensor.m_grid_a_voltage
    style:
      left: 38%
      top: 16%
    type: state-label
  - entity: sensor.m_grid_b_voltage
    style:
      left: 38%
      top: 19%
    type: state-label
  - entity: sensor.m_grid_c_voltage
    style:
      left: 38%
      top: 22%
    type: state-label
  - entity: sensor.m_grid_exporterd_energy
    style:
      left: 68%
      top: 7%
    suffix: ' >>> '
    type: state-label
  - entity: sensor.m_grid_accumulated_energy
    prefix: ' <<< '
    style:
      left: 68%
      top: 13%
    type: state-label
  - entity: sensor.energy_used
    style:
      left: 68%
      top: 31%
    suffix: ' >>> '
    type: state-label
  - entity: sensor.daily_yield
    prefix: 'Dzisiaj '
    style:
      left: 40%
      top: 37%
    type: state-label
  - entity: sensor.total_yield
    prefix: 'Total '
    style:
      left: 68%
      top: 37%
    type: state-label
  - entity: sensor.sun2000_8ktl_m0
    style:
      left: 20%
      top: 37%
    type: state-label
  - entity: sensor.phase_a_current
    style:
      left: 40%
      top: 46%
    type: state-label
  - entity: sensor.phase_a_voltage
    style:
      left: 26%
      top: 46%
    type: state-label
  - entity: sensor.phase_b_current
    style:
      left: 40%
      top: 49%
    type: state-label
  - entity: sensor.phase_b_voltage
    style:
      left: 26%
      top: 49%
    type: state-label
  - entity: sensor.phase_c_current
    style:
      left: 40%
      top: 52%
    type: state-label
  - entity: sensor.phase_c_voltage
    style:
      left: 26%
      top: 52%
    type: state-label
  - attribute: device_status
    entity: sensor.sun2000_8ktl_m0
    style:
      left: 60%
      top: 62%
    type: state-label
  - entity: sensor.pv_input_power
    style:
      left: 20%
      top: 62%
    type: state-label
  - entity: sensor.pv_01_voltage
    style:
      left: 40%
      top: 70%
    type: state-label
  - entity: sensor.pv_01_current
    style:
      left: 60%
      top: 70%
    type: state-label
  - entity: sensor.pv_02_voltage
    style:
      left: 40%
      top: 88%
    type: state-label
  - entity: sensor.pv_02_current
    style:
      left: 60%
      top: 88%
    type: state-label
image: /local/sun2000e.png
title: Sun2000-8KTL-M0
type: picture-elements
- platform: template
  sensors:
    m_grid_exporterd_energy:
      friendly_name: "Prąd oddany do sieci"
      unit_of_measurement: 'kWh'
      icon_template: mdi:transmission-tower
      value_template: "{{ state_attr('sensor.sun2000_8ktl_m0', 'grid_exporterd_energy') }}"
 
    m_grid_accumulated_energy:
      friendly_name: "Prąd pobrany z sieci"
      unit_of_measurement: 'kWh'
      icon_template: mdi:transmission-tower
      value_template: "{{ state_attr('sensor.sun2000_8ktl_m0', 'grid_accumulated_energy') }}"

    energy_used:
      friendly_name: "Zużycie prądu dom"
      unit_of_measurement: 'kWh'
      value_template: >
        {{ '%0.2f' | format(states('sensor.total_yield') | float - 
                            states('sensor.m_grid_exporterd_energy') | float + 
                            states('sensor.m_grid_accumulated_energy') | float) }}

2 Likes