MindFreeze / ha-sankey-chart

A Home Assistant lovelace card to display a sankey chart. For example for power consumption
MIT License
432 stars 21 forks source link

Graph messed up #71

Closed martinarva closed 1 year ago

martinarva commented 1 year ago

Checklist:

Release with the issue: v1.5.2

Last working release (if known):

Browser and Operating System: Latest Chrome on latest MacOS

Description of problem:

Graph is messed up. The lights part in section 3

Screenshot 2023-01-02 at 16 34 32

lovelace yaml:

type: custom:sankey-chart
show_names: true
energy_date_selection: null
height: 500
unit_prefix: k
sections:
  - entities:
      - entity_id: sensor.total_main_energy_1
        children:
          - sensor.phase_1_energy
          - sensor.phase_2_energy
          - sensor.phase_3_energy
        name: Total Grid
        remaining:
          name: Other
  - entities:
      - entity_id: sensor.phase_1_energy
        name: Phase 1
        children:
          - sensor.heat_pump_phase_1_energy
          - sensor.downstairs_wc_mirror_lights_energy
          - sensor.downstairs_wc_ceiling_lights_energy
          - sensor.sauna_wahing_room_lights_energy
          - sensor.sauna_lights_energy
          - sensor.bathroom_lights_energy
          - sensor.bathroom_lights_energy_2
          - sensor.matu_s_room_lights_dimmer_energy
          - sensor.bedroom_lights_energy
          - sensor.marlon_s_room_lights_energy
          - sensor.pergola_lightning_energy
          - sensor.outdoor_kitchen_lights_energy
          - sensor.washing_machine_energy
          - sensor.dryer_energy
          - sensor.ev_charger_energy_3
          - sensor.stair_hallway_ceiling_lights_energy
          - sensor.2nd_floor_lobby_lights_energy
          - sensor.stair_lights_energy
          - sensor.wardrobe_lights_switch_0_energy
          - sensor.wardrobe_lights_switch_1_energy
        remaining:
          name: Other
      - entity_id: sensor.phase_2_energy
        name: Phase 2
        children:
          - sensor.heat_pump_phase_2_energy
          - sensor.garage_lights_energy
          - sensor.front_entrance_outdoor_lights_energy
          - sensor.majaesine_ouevalgus_energy
          - sensor.back_yard_outdoor_lightning_energy
          - sensor.balcony_lights_energy
          - sensor.hw_circulation_pump_device_energy
        remaining:
          name: Other
      - entity_id: sensor.phase_3_energy
        name: Phase 3
        children:
          - sensor.heat_pump_phase_3_energy
          - sensor.living_room_lights_energy
          - sensor.kitchen_ceiling_lights_electric_consumption_kwh
          - sensor.kitchen_island_lights_energy
          - sensor.dining_table_lights_electric_consumption_kwh_3
          - sensor.pool_pump_energy
          - sensor.home_dc_energy
          - sensor.hallway_lights_energy
        remaining:
          name: Other
  - entities:
      - entity_id: sensor.heat_pump_phase_1_energy
        name: Heat Pump Phase 1
        children:
          - sensor.heat_pump_energy
      - entity_id: sensor.heat_pump_phase_2_energy
        name: Heat Pump Phase 2
        children:
          - sensor.heat_pump_energy
      - entity_id: sensor.heat_pump_phase_3_energy
        name: Heat Pump Phase 3
        children:
          - sensor.heat_pump_energy
  - entities:
      - entity_id: sensor.heat_pump_energy
        type: passthrough
        children:
          - sensor.heat_pump_energy
      - entity_id: sensor.heat_pump_energy
        name: Heat Pump
      - entity_id: sensor.downstairs_wc_mirror_lights_energy
        name: WC Mirror Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.downstairs_wc_ceiling_lights_energy
        name: WC Ceiling Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.sauna_wahing_room_lights_energy
        name: Sauna Wahsing Room Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.sauna_lights_energy
        name: Sauna Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.bathroom_lights_energy
        name: Bathroom Ceiling Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.bathroom_lights_energy_2
        name: Bathroom Mirror Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.matu_s_room_lights_dimmer_energy
        name: Matu's Room Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.bedroom_lights_energy
        name: Bedroom Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.marlon_s_room_lights_energy
        name: Marlon's Room Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.pergola_lightning_energy
        name: Pergola Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.outdoor_kitchen_lights_energy
        name: Outdoor Kitchen Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.garage_lights_energy
        name: Garage Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.front_entrance_outdoor_lights_energy
        name: Outdoor Entrance Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.majaesine_ouevalgus_energy
        name: Outoor Front Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.back_yard_outdoor_lightning_energy
        name: Outdoor Backyard Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.balcony_lights_energy
        name: Outdoor Balcony Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.living_room_lights_energy
        name: Living Room Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.kitchen_ceiling_lights_electric_consumption_kwh
        name: Kitchen Ceiling Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.kitchen_island_lights_energy
        name: Kitchen Island Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.dining_table_lights_electric_consumption_kwh_3
        name: Dining Table Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.sauna_lobby_lights_energy
        name: Sauna Lobby Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.stair_hallway_ceiling_lights_energy
        name: Stair Hallway Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.2nd_floor_lobby_lights_energy
        name: 2nd Floor Lobby Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.stair_lights_energy
        name: Stair Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.wardrobe_lights_switch_0_energy
        name: Wardrobe Ceiling Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.wardrobe_lights_switch_1_energy
        name: Wardrobe Cupboard Lights
        children:
          - sensor.total_lights_energy
      - entity_id: sensor.hallway_lights_energy
        name: Hallway Lights
        children:
          - sensor.total_lights_energy
  - entities:
      - entity_id: sensor.heat_pump_energy
        name: Heat Pump
      - entity_id: sensor.ev_charger_energy_3
        name: EV Charger
      - entity_id: sensor.washing_machine_energy
        name: Washing Machine
      - entity_id: sensor.dryer_energy
        name: Dryer
      - entity_id: sensor.total_lights_energy
        name: Total Lights
      - entity_id: sensor.hw_circulation_pump_device_energy
        name: HW Pump
      - entity_id: sensor.pool_pump_energy
        name: Dish Washer
      - entity_id: sensor.home_dc_energy
        name: Home DC

-->

Javascript errors shown in the web inspector (if applicable):

Additional information:

MindFreeze commented 1 year ago

@martinarva Please let me know if this bug is still reproduced on v1.8.0

martinarva commented 1 year ago

Still looks the same. Maybe too many entities?

Screenshot 2023-01-11 at 09 50 53

MindFreeze commented 1 year ago

Just noticed you have too many heatpumps in 1 section:

- entity_id: sensor.heat_pump_energy
  type: passthrough
  children:
    - sensor.heat_pump_energy
- entity_id: sensor.heat_pump_energy
  name: Heat Pump

You don't need the second one

martinarva commented 1 year ago

Just noticed you have too many heatpumps in 1 section:

- entity_id: sensor.heat_pump_energy
  type: passthrough
  children:
    - sensor.heat_pump_energy
- entity_id: sensor.heat_pump_energy
  name: Heat Pump

You don't need the second one

oh, right. Must have keep the original one when i added the passtrhrough

martinarva commented 1 year ago

Outcome is still the same Screenshot 2023-01-19 at 15 18 54

martinarva commented 1 year ago

can confirm, it's fixed now

Screenshot 2023-01-25 at 17 41 59