Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line intersection in version 3.0 #194

Closed
2 tasks done
cb12tre opened this issue May 10, 2024 · 0 comments
Closed
2 tasks done

Line intersection in version 3.0 #194

cb12tre opened this issue May 10, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@cb12tre
Copy link

cb12tre commented May 10, 2024

Hi MindFreeze,
I'm not sure if this is a problem or if it just requires rewriting the code differently after updating to version 3.0.1 from version 2.4.0; in the new version the graph displays many overlapping lines.

Checklist:

  • I updated to the latest version available
  • I cleared the cache of my browser

Release with the issue:
3.0.0 and 3.0.1

Last working release (if known):
2.4.0

Browser and Operating System:
Vivaldi 6.7.3329.26 and Firefox 125.0.3 on Windows 11

Description of problem:
In version 2.4.0, everything is represented correctly and linearly:
image

In version 3.0.0 it appears like this, the data is correct but there are many intersections on the lines:
image

I tried to modify the lines "sort_by" and "sort_group_by_parent" but I couldn't solve the problem.

This is the code used:

type: custom:sankey-chart
min_state: 0.00001
show_names: true
wide: true
energy_date_selection: true
height: 550
unit_prefix: k
round: 2
min_box_height: 3
min_box_distance: 10
show_states: true
show_units: true
show_icons: true
throttle: 5000
sections:
  - entities:
      - entity_id: sensor.shellyem_055fbd_channel_1_energy
        children:
          - sensor.shellyem_055fbd_channel_2_energy
          - sensor.potenza_istantanea_varie_utenze_energy
          - rimanenza_notte_non_monitorato
  - entities:
      - entity_id: sensor.shellyem_055fbd_channel_2_energy
        children:
          - sensor.caldaia_energy
          - rimanenza_cucina
      - entity_id: sensor.potenza_istantanea_varie_utenze_energy
        color: green
        name: Altre utenze
        children:
          - virtuale_luci
          - virtuale_network&IoT
          - virtuale_tv
          - sensor.macchina_caffe_energy
          - rimanenza_altre_utenze
    sort_by: state
    sort_group_by_parent: true
  - entities:
      - type: remaining_child_state
        name: Luci
        color: yellow
        entity_id: virtuale_luci
        children:
          - sensor.luce_soggiorno_energy
          - virtuale_luci_cucina
          - virtuale_luci_bagno
          - sensor.interruttori_e_switch_iot_energy
          - virtuale_luci_camera_alfa
          - virtuale_luci_balconi
          - virtuale_luci_lavanderia
          - virtuale_luci_salotto
      - type: remaining_child_state
        name: Rete e dispositivi IoT
        color: RGB(255, 153, 80)
        entity_id: virtuale_network&IoT
        children:
          - sensor.nas_synology_ds920_energy
          - sensor.access_point_deco_zona_alfa_energy
          - sensor.access_point_deco_zona_beta_energy
          - sensor.router_huawei_4g_energy
          - sensor.echo_dot_camera_energy
          - sensor.echo_dot_cucina_energy
          - sensor.echo_dot_soggiorno_energy
      - type: remaining_child_state
        name: TV
        color: RGB(255, 130, 200)
        entity_id: virtuale_tv
        children:
          - sensor.tv_salotto_energy
          - sensor.amplificatore_salotto_energy
          - sensor.apple_tv_energy
    sort_by: state
    sort_group_by_parent: true
  - entities:
      - type: remaining_child_state
        name: Luci bagno
        color: yellow
        entity_id: virtuale_luci_bagno
        children:
          - sensor.faretti_bagno_alfa_energy
          - sensor.bagno_alfa_energy
      - type: remaining_child_state
        name: Luci cucina
        color: yellow
        entity_id: virtuale_luci_cucina
        children:
          - sensor.tavolo_cucina_energy
          - sensor.faretti_cucina_energy
      - type: remaining_child_state
        name: Luci camera Alfa
        color: yellow
        entity_id: virtuale_luci_camera_alfa
        children:
          - sensor.luce_camera_destra_energy
          - sensor.camera_ingresso_energy
          - sensor.camera_pianoforte_energy
          - sensor.luce_camera_sinistra_energy
      - type: remaining_child_state
        name: Luci balconi
        color: yellow
        entity_id: virtuale_luci_balconi
        children:
          - sensor.balcone_salotto_energy
          - sensor.balcone_soggiorno_energy
          - sensor.balcone_cucina_energy
          - sensor.balcone_camera_energy
      - type: remaining_child_state
        name: Luci lavanderia
        color: yellow
        entity_id: virtuale_luci_lavanderia
        children:
          - sensor.lavanderia_ripostiglio_energy
          - sensor.lavanderia_striscia_led_energy
      - type: remaining_child_state
        name: Luci salotto
        color: yellow
        entity_id: virtuale_luci_salotto
        children:
          - sensor.divano_destro_energy
          - sensor.divano_sinistro_energy
          - sensor.scrivania_energy
    sort_by: state
    sort_group_by_parent: true
  - entities:
      - sensor.faretti_bagno_alfa_energy
      - sensor.bagno_alfa_energy
      - sensor.tavolo_cucina_energy
      - sensor.faretti_cucina_energy
      - sensor.camera_ingresso_energy
      - sensor.camera_pianoforte_energy
      - sensor.luce_camera_destra_energy
      - sensor.luce_camera_sinistra_energy
      - sensor.balcone_salotto_energy
      - sensor.balcone_soggiorno_energy
      - sensor.balcone_camera_energy
      - sensor.balcone_cucina_energy
      - sensor.divano_destro_energy
      - sensor.divano_sinistro_energy
      - sensor.luce_soggiorno_energy
      - sensor.scrivania_energy
      - sensor.interruttori_e_switch_iot_energy
      - sensor.nas_synology_ds920_energy
      - sensor.access_point_deco_zona_alfa_energy
      - sensor.access_point_deco_zona_beta_energy
      - sensor.router_huawei_4g_energy
      - sensor.echo_dot_camera_energy
      - sensor.echo_dot_cucina_energy
      - sensor.echo_dot_soggiorno_energy
      - sensor.tv_salotto_energy
      - sensor.amplificatore_salotto_energy
      - sensor.apple_tv_energy
      - sensor.lavanderia_ripostiglio_energy
      - sensor.lavanderia_striscia_led_energy
      - entity_id: sensor.macchina_caffe_energy
        color: brown
        icon: mdi:coffee
      - entity_id: sensor.caldaia_energy
        color: red
        icon: mdi:water
      - entity_id: rimanenza_notte_non_monitorato
        type: remaining_parent_state
        name: Notte (non monitorato)
        color: purple
      - entity_id: rimanenza_cucina
        type: remaining_parent_state
        name: Rimanenza cucina
        color: purple
      - entity_id: rimanenza_altre_utenze
        type: remaining_parent_state
        name: Rimanenza altro
        color: purple
    sort_by: state
    sort_group_by_parent: true
@cb12tre cb12tre added the bug Something isn't working label May 10, 2024
@MindFreeze MindFreeze self-assigned this May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants