MindFreeze / ha-sankey-chart

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

Sankey Charts suddenly throws a RangeError: maximumFactionDigits value is out of range #200

Closed FlorianWilk closed 1 month ago

FlorianWilk commented 1 month ago

I am using SankeyCharts for several months now and it worked perfectly. Today, suddenly, the card throws an error saying: RangeError: maximumFractionDigits value is out of range.

I have not changed any configuration or any new devices.

image

FlorianWilk commented 1 month ago

this is my (unchanged) configuration:

 - height: 300
    unit_prefix: k
    round: 2
    min_box_height: 8
    static_scale: 1
    min_box_distance: 5
    monetary_unit: EUR
    show_states: true
    show_units: false
    convert_units_to: monetary
    electricity_price: 0.28
    energy_date_selection: true
    sections:
      - entities:
          - entity_id: sensor.shellypro3em_ht_total_active_energy
            subtract_entities: []
            name: Haushalt
            type: entity
            children:
              - buro
              - sensor.em_garage_total_active_energy
              - kueche
              - waschkeller
              - unknown
      - entities:
          - entity_id: buro
            type: remaining_child_state
            name: Büro
            color: '#a742f5'
            children:
              - sensor.shellyplusplugs_b0b21c18d79c_switch_0_energy
              - sensor.stecker_rechner_zusammenfassung_geliefert
              - sensor.stecker_netzwerk_zusammenfassung_geliefert
          - entity_id: kueche
            type: remaining_child_state
            name: Küche
            children:
              - sensor.spulmaschine_total_active_energy
              - sensor.stecker_kuche_1_zusammenfassung_geliefert
              - sensor.stecker_kuche_2_zusammenfassung_geliefert
          - entity_id: waschkeller
            type: remaining_child_state
            name: Waschkeller
            color: '#42f5e6'
            children:
              - sensor.trockner_total_active_energy
              - sensor.waschmaschine_total_active_energy
          - entity_id: sensor.em_garage_total_active_energy
            type: remaining_child_state
            name: Garage
            color: '#f5c242'
            children:
              - sensor.em_garage_total_active_energy
          - entity_id: unknown
            type: remaining_parent_state
            name: Unbekannt
            color: '#606060'
            children:
              - unbekannt
      - entities:
          - entity_id: sensor.stecker_netzwerk_zusammenfassung_geliefert
            type: entity
            name: Netzwerk
            color: '#a742f5'
            children: []
          - entity_id: sensor.stecker_rechner_zusammenfassung_geliefert
            type: entity
            name: Rechner
            color: '#a742f5'
            children: []
          - entity_id: sensor.shellyplusplugs_b0b21c18d79c_switch_0_energy
            type: entity
            name: Stecker
            children: []
          - entity_id: sensor.stecker_kuche_1_zusammenfassung_geliefert
            type: entity
            name: Küche rechts
            children: []
          - entity_id: sensor.stecker_kuche_2_zusammenfassung_geliefert
            type: entity
            name: Küche links
            children: []
          - entity_id: sensor.spulmaschine_total_active_energy
            type: entity
            name: Spülmaschine
            color: '#42f5e6'
            children: []
          - entity_id: sensor.trockner_total_active_energy
            type: entity
            name: Trockner
            color: '#42f5e6'
            children: []
          - entity_id: sensor.waschmaschine_total_active_energy
            type: entity
            name: Waschmaschine
            color: '#42f5e6'
            children: []
          - entity_id: sensor.em_garage_total_active_energy
            type: entity
            name: Garage
            color: '#f5c242'
            children: []
          - entity_id: unbekannt
            type: remaining_parent_state
            name: Unbekannt
            color: '#606060'
            children: []
    type: custom:sankey-chart
    min_state: 0
    title: Energieverteilung Haushalt
    show_names: true
    show_icons: false
    wide: true
FlorianWilk commented 1 month ago

Update: I found the cause but i can't explain it: if i comment out

monetary_unit: EUR

it works again.

MindFreeze commented 1 month ago

I think I know what can cause this. Will fix it in the next version

FlorianWilk commented 1 month ago

I think I know what can cause this. Will fix it in the next version

Cool, thxalot!