Anyone using the Sankey Chart Card?

A card can only show data that home assistant has, and HA doesn’t track that per device

I don’t seem to be able to get the chart to show all the connections it should.

There should be a flow of power from Grid to the battery and from the Battery Use to Export. I think I’ve got those included in the config, but they don’t seem to work. The data is from a Telsa Powerwall and SolarEdge Inverter.

Can anyone spot what I’m doing wrong?

height: 200
unit_prefix: k
round: 1
min_box_height: 10
min_box_distance: 5
show_states: true
show_units: true
sections:
  - entities:
      - name: Solar
        type: entity
        children:
          - sensor.powerwall_battery_import
          - sensor.powerwall_site_export
          - sensor.powerwall_load_import
        entity_id: sensor.solaredge_lifetime_energy
        color: var(--warning-color)
        color_on_state: false
      - name: Grid
        type: entity
        children:
          - sensor.powerwall_battery_import
          - sensor.powerwall_load_import
        entity_id: sensor.powerwall_site_import
        color: brown
  - entities:
      - name: Battery Charging
        type: entity
        children:
          - sensor.powerwall_battery_export
        entity_id: sensor.powerwall_battery_import
        color: var(--success-color)
      - type: passthrough
        children:
          - sensor.powerwall_site_export
        entity_id: sensor.powerwall_site_export
      - type: passthrough
        children:
          - sensor.powerwall_load_import
        entity_id: sensor.powerwall_load_import
  - entities:
      - name: Battery Use
        type: entity
        children:
          - sensor.powerwall_load_import
          - sensor.powerwall_site_export
        entity_id: sensor.powerwall_battery_export
        color: purple
      - type: passthrough
        children:
          - sensor.powerwall_site_export
        entity_id: sensor.powerwall_site_export
      - type: passthrough
        children:
          - sensor.powerwall_load_import
        entity_id: sensor.powerwall_load_import
        name: House Load
  - entities:
      - type: entity
        children: []
        entity_id: sensor.powerwall_load_import
        name: House
      - type: entity
        children: []
        entity_id: sensor.powerwall_site_export
        name: Export
        color: var(--success-color)
energy_date_selection: true
type: custom:sankey-chart
min_state: 0
show_names: true
show_icons: false
wide: true
title: Power flow

Try changing the order in the config. The card doesn’t know how big each connection is yet (it is a planned feature) so it tries to guess based on the order.

I think the difficulty is the size of each connection changes depending on the time of day and conditions (eg if there’s much solar). I’ve re-ordered a couple of things and it’s helped. Thanks

I’m experiencing a weird problem. Sankey chart with 3 sections seems to work just fine, but adding 4th section breaks the card. Here is my working config with 3 sections:

type: custom:sankey-chart
show_names: true
wide: true
sections:
  - entities:
      - entity_id: sensor.ginlong_solis_inverter_active_power
        name: Solar
        color: var(--warning-color)
        icon: mdi:sun-wireless-outline
        children:
          - sensor.gavazzi_esp32_total_power
          - sensor.power_to_grid
      - entity_id: sensor.power_from_grid
        name: Import
        color: red
        icon: mdi:transmission-tower-import
        children:
          - sensor.gavazzi_esp32_total_power
  - entities:
      - entity_id: sensor.gavazzi_esp32_total_power
        name: Total consumption
        icon: mdi:home
        children:
          - sensor.gavazzi_esp32_power_l1
          - sensor.gavazzi_esp32_power_l2
          - sensor.gavazzi_esp32_power_l3
      - entity_id: sensor.power_to_grid
        name: Export
        color: green
        icon: mdi:transmission-tower-export
        children:
          - sensor.ginlong_solis_inverter_active_power
  - entities:
      - entity_id: sensor.gavazzi_esp32_power_l1
      - entity_id: sensor.gavazzi_esp32_power_l2
      - entity_id: sensor.gavazzi_esp32_power_l3

As soon as I add 4th section like this:

type: custom:sankey-chart
show_names: true
wide: true
sections:
  - entities:
      - entity_id: sensor.ginlong_solis_inverter_active_power
        name: Solar
        color: var(--warning-color)
        icon: mdi:sun-wireless-outline
        children:
          - sensor.gavazzi_esp32_total_power
          - sensor.power_to_grid
      - entity_id: sensor.power_from_grid
        name: Import
        color: red
        icon: mdi:transmission-tower-import
        children:
          - sensor.gavazzi_esp32_total_power
  - entities:
      - entity_id: sensor.gavazzi_esp32_total_power
        name: Total consumption
        icon: mdi:home
        children:
          - sensor.gavazzi_esp32_power_l1
          - sensor.gavazzi_esp32_power_l2
          - sensor.gavazzi_esp32_power_l3
      - entity_id: sensor.power_to_grid
        name: Export
        color: green
        icon: mdi:transmission-tower-export
        children:
          - sensor.ginlong_solis_inverter_active_power
  - entities:
      - entity_id: sensor.gavazzi_esp32_power_l1
      - entity_id: sensor.gavazzi_esp32_power_l2
      - entity_id: sensor.gavazzi_esp32_power_l3
        children:
          - sensor.shellyplug_s_7c87ceba9f60_power
  - entities:
      - entity_id: sensor.shellyplug_s_7c87ceba9f60_power
        name: AC

I get this:

Error: Missing connection: sensor.gavazzi_esp32_power_l3 - sensor.shellyplug_s_7c87ceba9f60_power

Any ideas what I might be doing wrong here? If I split 4 section card into two separate cards with 2 sections they both work just fine.

The error msg is not right but you have sensor.ginlong_solis_inverter_active_power as child in the second section and it doesn’t exist in the third or fourth. Try removing that from children.

Removed sensor.ginlong_solis_inverter_active_power from children, it works now, thank you! The error message really blinded me.

I have this same problem for a while now, but only for daily and weekly views. It indeed happens to entities that become unavailable during certain times. In my case e.g. solar energy sensors that are not reported during night time.

I am trying to transfer my values ​​from the energy dashboard. However, it doesn’t work and I don’t understand why. I have an fronius enegry meter.
I use the same sensors as the energy dashboard.


- type: custom:sankey-chart
  show_names: true
  unit_prefix: k
  round: 1
  wide: true
  sections:
    - entities:
        - entity_id: sensor.solarnet_power_photovoltaics
          color: var(--warning-color)
          children:
            - sensor.symo_8_2_3_m_1_energy_total
        - entity_id: sensor.solarnet_power_grid
          children:
            - sensor.symo_8_2_3_m_1_energy_total

Here are my sensors:



Does anyone know which sensors to use exactly with Fronius?

You only have 1 section. At the very least, you have to add another one containing sensor.symo_8_2_3_m_1_energy_total

Thats not my point in the picture you see 4,8 kW in sankey and in the energy dashboard you see 12,8 kwh and 2 kWH consumption.

The 4,8 kW ist the current solar grid power. I would expect that I see the same in sankey chart like in the energy dashboard.
Also 2 sections with 12,8 kWh orange and 2 kWh with default color

I think you are mixing kW and kWh. Your energy dash board shows energy in kWh while you have configured sankey with the kW entities that show power. Sankey chart supports both so you have to set it up with ones you want.
You can also try autoconfig for energy but it doesn’t work for everyone.

Yes it seem so, but how I said I just use my Fronius Sensor - the same like in the energy dashboard ;). I shared all my sensors, I don’t see which I should use instead.
So thats my question which Fronius sensor should I use that I have the same information like in the energy dashboard for solar and consumption.

@MindFreeze do you have an idea which sensor I need?

Is anyone happy with the Sankey using it as a power distribution card? If so, would be happy to see the yaml code. I have done several attempts, but always failed using this card. I have a pretty simple
configuration:

  • power from solar
  • power from grid
  • several consumptions, some of them with “childs” others not

woudl be great to see some really running solutions. Thanks JJ

I’m happy one :slight_smile: But be careful what you wish for :slight_smile: Here is how my setup looks right now:


And here is working code:

type: custom:sankey-chart
show_names: true
round: 1
wide: true
height: 900
show_icons: false
show_states: true
min_box_height: 5
min_box_distance: 10
sections:
  - entities:
      - entity_id: sensor.phase_a_power
        color: var(--red5)
        name: Phase-A
        children:
          - sensor.power_total
      - entity_id: sensor.phase_b_power
        color: var(--red4)
        name: Phase-B
        children:
          - sensor.power_total
      - entity_id: sensor.phase_c_power
        color: var(--red3)
        name: Phase-C
        children:
          - sensor.power_total
      - entity_id: sensor.external_power_total
        color: var(--red2)
        name: External
        children:
          - sensor.power_total
  - entities:
      - entity_id: sensor.power_total
        color: var(--magenta3)
        name: Total Power
        children:
          - sensor.attic_power_total
          - sensor.first_floor_power_total
          - sensor.ground_floor_power_total
          - sensor.basement_power_total
          - sensor.garden_power_total
        remaining:
          name: Other Devices
          color: var(--orange3)
  - entities:
      - entity_id: sensor.attic_power_total
        color: var(--lightblue1)
        name: Attic
        children:
          - sensor.tv_room_power_total
          - sensor.wardrobe_power_total
      - entity_id: sensor.first_floor_power_total
        color: var(--lightblue2)
        name: First Floor
        children:
          - sensor.dorota_office_power_total
          - sensor.mirek_office_power_total
          - sensor.library_power_total
      - entity_id: sensor.ground_floor_power_total
        color: var(--lightblue3)
        name: Ground Floor
        children:
          - sensor.living_room_power_total
          - sensor.toilet_power_total
          - sensor.kitchen_power_total
          - sensor.hall_power_total
      - entity_id: sensor.basement_power_total
        color: var(--lightblue4)
        name: Basement
        children:
          - sensor.basement_main_power
          - sensor.my_it_rack
          - sensor.basement_equipment_power
      - entity_id: sensor.garden_power_total
        color: var(--green2)
        name: Garden
        children:
          - sensor.garden_light_power
          - sensor.driveway_lights_power
          - sensor.external_stairway_lights_power
          - sensor.automover_power
          - sensor.garage_equipment_power
          - sensor.front_christmas_lights_power
          - sensor.balcony_christmas_lights_power
  - entities:
      - entity_id: sensor.tv_room_power_total
        color: var(--green3)
        name: TV Room
        children:
          - sensor.tv_room_main_light_total
          - sensor.desk_lamp_power
          - sensor.tv_shelf_illumination_power
          - sensor.tv_illumination_power
          - sensor.sony_bravia_tv_power
          - sensor.denon_avr_s750h_power
          - sensor.apple_tv_power
          - sensor.tv_room_equipment_power
          - sensor.stairway_lights_channel_4_power
      - entity_id: sensor.wardrobe_power_total
        color: var(--green2)
        name: Wardrobe
        children:
          - sensor.iron_power
      - entity_id: sensor.dorota_office_power_total
        color: var(--green1)
        name: Dorota Office
        children:
          - sensor.dorota_main_light_power_total
          - sensor.dorota_floor_lamp_power
          - sensor.dorota_office_equipment_power
          - sensor.dorota_imac_power
      - entity_id: sensor.mirek_office_power_total
        color: var(--lemon1)
        name: Mirek Office
        children:
          - sensor.mirek_ceiling_power
          - sensor.mirek_desk_lamp_power
          - sensor.mirek_mac_pro_power
          - sensor.mirek_work_laptop_power
          - sensor.mirek_office_equipment_power
      - entity_id: sensor.library_power_total
        color: var(--lemon2)
        name: Library
        children:
          - sensor.library_light_total
      - entity_id: sensor.living_room_power_total
        color: var(--lemon3)
        name: Living Room
        children:
          - sensor.living_room_ceiling_total
          - sensor.living_room_dinning_table_total
          - sensor.coffe_table_light_electric_consumption_w
          - sensor.living_room_table_lamp_power
          - sensor.marantz_model_30_power
          - sensor.living_room_equipment_power
      - entity_id: sensor.toilet_power_total
        color: var(--yellow2)
        name: Toilet
        children:
          - sensor.toilet_light_power
          - sensor.toilet_equipment_power
      - entity_id: sensor.kitchen_power_total
        color: var(--yellow3)
        name: Kitchen
        children:
          - sensor.kitchen_main_lights_power
          - sensor.kitchen_table_power
          - sensor.induction_owen_power_total
          - sensor.shelly_coffee_machine_power
          - sensor.shelly_dishwasher_power
          - sensor.microwave_owen_power_total
          - sensor.shelly_washing_machine_power
          - sensor.pantry_power
          - sensor.ground_floor_equipment_power
      - entity_id: sensor.hall_power_total
        color: var(--yellow4)
        name: Hall
        children:
          - sensor.stairways_power_total
          - sensor.hall_lights_power
  - entities:
      - entity_id: sensor.tv_room_main_light_total
        color: var(--orange1)
        name: TV Room Main Light
      - entity_id: sensor.desk_lamp_power
        color: var(--orange1)
        name: TV Room Lamp
      - entity_id: sensor.tv_shelf_illumination_power
        color: var(--orange1)
        name: Shelf Illumination
      - entity_id: sensor.tv_illumination_power
        color: var(--orange1)
        name: TV Illumination
      - entity_id: sensor.sony_bravia_tv_power
        color: var(--cyan1)
        name: Sony Bravia AG9
      - entity_id: sensor.denon_avr_s750h_power
        color: var(--cyan1)
        name: Denon AVR-S750H
      - entity_id: sensor.apple_tv_power
        color: var(--cyan1)
        name: Apple TV
      - entity_id: sensor.tv_room_equipment_power
        color: var(--magenta1)
        name: TV Room Devices
      - entity_id: sensor.stairway_lights_channel_4_power
        color: var(--orange1)
        name: Attic Stairways Illumination
      - entity_id: sensor.iron_power
        color: var(--green1)
        name: Iron
      - entity_id: sensor.dorota_main_light_power_total
        color: var(--orange1)
        name: Dorota Main Lights
      - entity_id: sensor.dorota_floor_lamp_power
        color: var(--orange1)
        name: Dorota Floor Lamp
      - entity_id: sensor.dorota_office_equipment_power
        color: var(--magenta1)
        name: Dorota Office Devices
      - entity_id: sensor.dorota_imac_power
        color: var(--cyan1)
        name: Dorota iMac
      - entity_id: sensor.mirek_ceiling_power
        color: var(--orange1)
        name: Mirek Main Lights
      - entity_id: sensor.mirek_desk_lamp_power
        color: var(--orange1)
        name: Mirek Desk Lamp
      - entity_id: sensor.mirek_mac_pro_power
        color: var(--cyan1)
        name: Mirek Mac Pro
      - entity_id: sensor.mirek_work_laptop_power
        color: var(--cyan1)
        name: Mirek Laptop
      - entity_id: sensor.mirek_office_equipment_power
        color: var(--magenta1)
        name: Mirek Office Devices
      - entity_id: sensor.library_light_total
        color: var(--orange1)
        name: Library Main Lights
      - entity_id: sensor.living_room_ceiling_total
        color: var(--orange1)
        name: Living Room Ceiling Lights
      - entity_id: sensor.living_room_dinning_table_total
        color: var(--orange1)
        name: Living Room Dinning Table
      - entity_id: sensor.coffe_table_light_electric_consumption_w
        color: var(--orange1)
        name: Living Room Coffee Table
      - entity_id: sensor.living_room_table_lamp_power
        color: var(--orange1)
        name: Living Room Lamp
      - entity_id: sensor.marantz_model_30_power
        color: var(--cyan1)
        name: Marantz SACD30n
      - entity_id: sensor.living_room_equipment_power
        color: var(--cyan1)
        name: Other Equipment
      - entity_id: sensor.toilet_light_power
        color: var(--orange1)
        name: Toilet Light
      - entity_id: sensor.toilet_equipment_power
        color: var(--orange1)
        name: Toilet Equipment
      - entity_id: sensor.kitchen_main_lights_power
        color: var(--orange1)
        name: Kitchen Main Lights
      - entity_id: sensor.kitchen_table_power
        color: var(--orange1)
        name: Kitchen Table Lights
      - entity_id: sensor.induction_owen_power_total
        color: var(--cyan1)
        name: Owen
      - entity_id: sensor.shelly_coffee_machine_power
        color: var(--cyan1)
        name: Coffee Machine
      - entity_id: sensor.shelly_dishwasher_power
        color: var(--cyan1)
        name: Dishwasher
      - entity_id: sensor.microwave_owen_power_total
        color: var(--cyan1)
        name: Microwave
      - entity_id: sensor.shelly_washing_machine_power
        color: var(--cyan1)
        name: Washing Machine
      - entity_id: sensor.pantry_power
        color: var(--orange1)
        name: Pantry Lights
      - entity_id: sensor.ground_floor_equipment_power
        color: var(--magenta1)
        name: Ground Floor Devices
      - entity_id: sensor.stairways_power_total
        color: var(--orange1)
        name: Stairways Lights
      - entity_id: sensor.hall_lights_power
        color: var(--orange1)
        name: Hall Lights
      - entity_id: sensor.basement_main_power
        color: var(--orange1)
        name: Basement Light
      - entity_id: sensor.my_it_rack
        color: var(--cyan1)
        name: IT Rack
      - entity_id: sensor.basement_equipment_power
        color: var(--magenta1)
        name: Basement Devices
      - entity_id: sensor.garden_light_power
        color: var(--orange1)
        name: Garden Lights
      - entity_id: sensor.driveway_lights_power
        color: var(--orange1)
        name: Driveway Lights
      - entity_id: sensor.external_stairway_lights_power
        color: var(--orange1)
        name: Stairway Lights
      - entity_id: sensor.automover_power
        color: var(--green1)
        name: Automover
      - entity_id: sensor.garage_equipment_power
        color: var(--magenta1)
        name: Garage Devices
      - entity_id: sensor.front_christmas_lights_power
        color: var(--orange1)
        name: Front Christmas Lights
      - entity_id: sensor.balcony_christmas_lights_power
        color: var(--orange1)
        name: Balcony Christmas Lights

As yopu can see I do not have solars or so, but as External there is estimated power consumption that is not measured by my my main meter (Shelly 3EM). So same way it could be replaced by solar.

3 Likes

Here’s mine:
image

Code here. I have had to create a few custom sensors to get the right data out of Solarnet so the data makes sense.

type: custom:vertical-stack-in-card
cards:
  - type: custom:sankey-chart
    title: Live Power
    show_names: true
    round: 0
    wide: true
    height: 120
    style: |
      ha-card {
        border: solid 0px ;
      }
    sections:
      - entities:
          - entity_id: sensor.solarnet_power_photovoltaics
            name: Solar
            icon: mdi:solar-power-variant
            color: var(--warning-color)
            children:
              - sensor.electricity_grid_export_current
              - sensor.electricity_load_current
          - entity_id: sensor.electricity_grid_import_current
            icon: mdi:transmission-tower-import
            name: Grid
            color: maroon
            children:
              - sensor.electricity_load_current
      - entities:
          - entity_id: sensor.electricity_load_current
            name: Load
            icon: mdi:power-plug
          - entity_id: sensor.electricity_grid_export_current
            icon: mdi:transmission-tower-import
            color: rgb(0, 128, 0)
            name: Export
  - type: custom:sankey-chart
    title: Today's Energy
    show_names: true
    unit_prefix: k
    round: 2
    wide: true
    height: 120
    style: |
      ha-card {
        border: solid 0px ;
      }
    sections:
      - entities:
          - entity_id: sensor.primo_8_2_1_1_energy_day
            name: Solar
            color: rgb(255, 166, 0)
            children:
              - sensor.electricity_solar_export_daily
              - consumed
          - entity_id: sensor.electricty_grid_import_daily
            name: Grid Import
            color: maroon
            children:
              - consumed
      - entities:
          - entity_id: sensor.electricity_solar_export_daily
            name: Export
            color: green
          - entity_id: consumed
            type: remaining_parent_state
            name: Consumed

Senor.yaml

    # Current Grid Import and Export
    electricity_grid_export_current:
      friendly_name: Current Grid Export
      unit_of_measurement: "W"
      value_template: >
        {% if states('sensor.solarnet_power_grid') < '0' -%}
          {{ states('sensor.solarnet_power_grid')|float * -1 }}
        {%- else -%}
          0
        {%- endif %}
    electricity_grid_import_current:
      friendly_name: Current Grid Import
      unit_of_measurement: "W"
      value_template: >
        {% if states('sensor.solarnet_power_grid') > '0' -%}
          {{ states('sensor.solarnet_power_grid')}}
        {%- else -%}
          0
        {%- endif %}

Hello,

Can someone please help me?

I had the sankey-chart working for a while and recently I added some more monitoring devices and I’m not able to integrate them in the way I want in the sankey chart.

What I want to achieve is the following.
The sensor.energy_monitoring_meterkast_2_keuken_energy is monitoring ALL energy usage in the kitchen. I want to use that one as the state giver for the 'Keuken'

sensor.beneden_plug_koelkast_energy, sensor.beneden_plug_vriezer_energy and sensor.beneden_plug_keuken_vaatwasser_energy
are measuring the power usage of the Freezer, Fridge and Dishwasher.

All remaining power measured by sensor.energy_monitoring_meterkast_2_keuken_energy should show as Overige Keuken

With the YAML below the following is generated

As you can see there is a loose branch created.

YAML
height: 250
unit_prefix: k
round: 1
min_box_height: 5
min_box_distance: 8
show_states: true
show_units: true
sections:
  - entities:
      - type: entity
        children:
          - sensor.p1_meter_3c39e724af30_total_power_export_t2
          - sensor.p1_meter_3c39e724af30_total_power_export_t1
          - total
        entity_id: sensor.solaredge_lifetime_energy
        name: Zonnepanelen
        color: yellow
        color_on_state: false
        icon: mdi:solar-power-variant-outline
      - type: entity
        children:
          - sensor.p1_meter_3c39e724af30_total_power_export_t2
          - sensor.p1_meter_3c39e724af30_total_power_export_t1
          - total
        entity_id: sensor.p1_meter_3c39e724af30_total_power_import_t1
        add_entities:
          - sensor.p1_meter_3c39e724af30_total_power_import_t2
        subtract_entities:
          - sensor.p1_meter_3c39e724af30_total_power_export_t1
          - sensor.p1_meter_3c39e724af30_total_power_export_t2
        name: Import vanaf het net
        color: lightsteelblue
        icon: mdi:transmission-tower-export
  - entities:
      - type: entity
        children: []
        entity_id: sensor.p1_meter_3c39e724af30_total_power_export_t2
        name: Export (2)
        subtract_entities:
          - sensor.p1_meter_3c39e724af30_total_power_import_t1
          - sensor.p1_meter_3c39e724af30_total_power_import_t2
        color: green
      - type: entity
        children: []
        entity_id: sensor.p1_meter_3c39e724af30_total_power_export_t1
        name: Export (1)
        subtract_entities:
          - sensor.p1_meter_3c39e724af30_total_power_import_t1
          - sensor.p1_meter_3c39e724af30_total_power_import_t2
        color: green
      - type: remaining_parent_state
        children:
          - unknown
          - sensor.energy_monitoring_meterkast_2_keuken_energy
          - werkkamer
          - zolder
          - kelder
          - badkamer
        entity_id: total
        name: Totaal verbruik
        icon: mdi:home-lightning-bolt
  - entities:
      - type: remaining_parent_state
        children: []
        entity_id: unknown
        name: Onbekend
        color: grey
        icon: mdi:help-network
      - entity_id: sensor.energy_monitoring_meterkast_2_keuken_energy
        name: Keuken
        icon: mdi:countertop
        color: purple
        children:
          - overige_keuken
          - sensor.beneden_plug_koelkast_energy
          - sensor.beneden_plug_vriezer_energy
          - sensor.beneden_plug_keuken_vaatwasser_energy
      - type: remaining_child_state
        children:
          - sensor.beneden_plug_server_energy
          - sensor.beneden_plug_3d_printer_energy
          - sensor.beneden_plug_pc_bart_energy
        entity_id: werkkamer
        name: Werkkamer
        icon: mdi:hammer-wrench
        color: orange
      - type: remaining_child_state
        children:
          - sensor.boven_plug_zolder_wasmachine_energy
        entity_id: zolder
        name: Zolder
        color: red
        icon: mdi:home-roof
      - type: remaining_child_state
        children:
          - sensor.energy_monitoring_meterkast_2_boiler_energy
        entity_id: badkamer
        name: Badkamer
        icon: mdi:bathtub
        color: aqua
      - type: remaining_child_state
        children:
          - sensor.beneden_plug_taxidermie_vriezer_energy
        entity_id: kelder
        name: Kelder
        color: yellow
        icon: phu:rooms-storage
  - entities:
      - type: remaining_parent_state
        entity_id: overige_keuken
        name: Overige
      - type: remaining_child_state
        children:
          - sensor.beneden_plug_koelkast_energy
          - sensor.beneden_plug_vriezer_energy
          - sensor.beneden_plug_keuken_vaatwasser_energy
  - entities:
      - type: entity
        children: []
        entity_id: sensor.beneden_plug_koelkast_energy
        name: Koelkast
        icon: mdi:fridge
        color: purple
      - type: entity
        children: []
        entity_id: sensor.beneden_plug_vriezer_energy
        name: Vriezer
        icon: mdi:fridge-industrial
        color: purple
      - type: entity
        children: []
        entity_id: sensor.beneden_plug_keuken_vaatwasser_energy
        name: Vaatwasser
        icon: mdi:dishwasher
        color: purple
      - type: entity
        children: []
        entity_id: sensor.beneden_plug_server_energy
        name: Serverkast
        icon: mdi:server-network
        color: orange
      - type: entity
        children: []
        entity_id: sensor.beneden_plug_pc_bart_energy
        icon: mdi:desktop-classic
        name: PC Bart
        color: orange
      - type: entity
        children: []
        entity_id: sensor.beneden_plug_3d_printer_energy
        name: 3D Printer
        icon: mdi:printer-3d
        color: orange
      - type: entity
        children: []
        entity_id: sensor.boven_plug_zolder_wasmachine_energy
        icon: mdi:washing-machine
        name: Wasmachine
        color: red
      - type: entity
        children: []
        entity_id: sensor.energy_monitoring_meterkast_2_boiler_energy
        icon: mdi:water-boiler
        name: Boiler
        color: aqua
      - type: entity
        children: []
        entity_id: sensor.beneden_plug_taxidermie_vriezer_energy
        color: yellow
        name: Taxidermie vriezer
energy_date_selection: true
type: custom:sankey-chart
wide: true
show_names: true
show_icons: true
min_state: 0

Hi all,

This is what I got so far, after fiddling around with the Sankey diagram. One image shows a day where we used more energy than the solar panels produced, the other image shows a day where we produced more than we used.

Usage > production:

Usage < production:

I’m pretty happy with the result so far. The only thing I don’t like is how the icons are rendered. The bars are a bit too narrow for the icons to nicely fit. I couldn’t find a setting to make the bars wider. Or is there a setting for that? To be honest, I think it would be better if the icons were rendered as part of the label. That would also work with bars that are not that high, such as those of my lightbulbs.

YAML
type: vertical-stack
cards:
  - type: energy-date-selection
  - height: 500
    unit_prefix: k
    round: 1
    min_box_height: 3
    min_box_distance: 10
    show_states: true
    show_units: true
    sections:
      - entities:
          - type: entity
            children:
              - sensor.electricity_meter_energieproductie_tarief_2
              - sensor.electricity_meter_energieproductie_tarief_1
              - total
            entity_id: sensor.solarpanels_energy_production
            color: var(--warning-color)
            name: Zonnepanelen
            icon: mdi:solar-power-variant-outline
          - type: entity
            children:
              - sensor.electricity_meter_energieproductie_tarief_2
              - sensor.electricity_meter_energieproductie_tarief_1
              - total
            entity_id: sensor.electricity_meter_energieverbruik_tarief_1
            add_entities:
              - sensor.electricity_meter_energieverbruik_tarief_2
            subtract_entities:
              - sensor.electricity_meter_energieproductie_tarief_1
              - sensor.electricity_meter_energieproductie_tarief_2
            name: Import
            icon: mdi:transmission-tower-import
            color: var(--error-color)
      - entities:
          - type: entity
            children: []
            entity_id: sensor.electricity_meter_energieproductie_tarief_2
            color: var(--success-color)
            subtract_entities:
              - sensor.electricity_meter_energieverbruik_tarief_1
              - sensor.electricity_meter_energieverbruik_tarief_2
            name: Export
            icon: mdi:transmission-tower-export
          - type: entity
            children: []
            entity_id: sensor.electricity_meter_energieproductie_tarief_1
            subtract_entities:
              - sensor.electricity_meter_energieverbruik_tarief_1
              - sensor.electricity_meter_energieverbruik_tarief_2
            name: Export
            icon: mdi:transmission-tower-export
            color: var(--success-color)
          - type: remaining_parent_state
            children:
              - no_area
              - unknown
            entity_id: total
            name: Eigen verbruik
      - entities:
          - type: remaining_child_state
            children:
              - verlichting
              - overig
            entity_id: no_area
            name: Apparaten met verbruikmeter
            icon: mdi:meter-electric
          - type: remaining_parent_state
            children: []
            entity_id: unknown
            name: Apparaten zonder verbruikmeter
            icon: mdi:lightbulb-question-outline
      - entities:
          - type: remaining_child_state
            children:
              - sensor.eettafel_energy
              - sensor.lamp_berging_zolder_energy
              - sensor.lotek_1_energy
              - sensor.lotek_2_energy
            entity_id: verlichting
            name: Verlichting
            icon: mdi:lightbulb-group-outline
          - type: remaining_child_state
            children:
              - sensor.stekker_droger_summation_delivered
              - sensor.stekker_wasmachine_summation_delivered
            entity_id: overig
            name: Overig
      - entities:
          - type: entity
            children: []
            entity_id: sensor.eettafel_energy
            name: Lamp eettafel
            icon: mdi:ceiling-light
          - type: entity
            children: []
            entity_id: sensor.lamp_berging_zolder_energy
            name: Verlichting berging zolder
            icon: mdi:lightbulb
          - type: entity
            children: []
            entity_id: sensor.lotek_1_energy
            name: Lotek 1
            icon: mdi:floor-lamp-outline
          - type: entity
            children: []
            entity_id: sensor.lotek_2_energy
            name: Lotek 2
            icon: mdi:floor-lamp-outline
          - type: entity
            children: []
            entity_id: sensor.stekker_droger_summation_delivered
            name: Droger
            icono: mdi:tumble-dryer
          - type: entity
            children: []
            entity_id: sensor.stekker_wasmachine_summation_delivered
            name: Wasmachine
            icon: mdi:washing-machine
    type: custom:sankey-chart
    energy_date_selection: true
    min_state: 0
    show_names: true
    show_icons: true
    wide: true
1 Like

is your heat pump cycling too often?

No. It’s a ducted heat pump, not a mini-split.

1 Like