flixlix / power-flow-card-plus

A power distribution card inspired by the official Energy Distribution card for Home Assistant
603 stars 75 forks source link

no decimals in the secondary info in "individual1" [BUG] #332

Closed cpohli closed 1 year ago

cpohli commented 1 year ago

Describe the bug The "individual1" (indivudal2 not tested) does not show decimals in the secondary info. Despite configured via "decimals: 1" or "decimals: 2". Always 0 decimals are shown.

To Reproduce Steps to reproduce the behavior:

          individual1:
            entity: sensor.sma_wallbox_aktuell_kw
            icon: mdi:car-electric
            color: '#80b8ff'
            name: Wallbox
            color_icon: false
            secondary_info:
              entity: sensor.sma_wallbox_daily_kwh
              unit_of_measurement: "kWh"
              decimals: 1
            display_zero: true

If i copy the secondary info to on of the others (solar or home etc. it is displayed correctly.

Expected behavior Show rounded value with 1 decimal

Screenshots in the attached screenshot i copied the secondary sensor from "solar" to "wallbox". Both are configued as:

            secondary_info:
              entity: sensor.solar_daily_kwh
              unit_of_measurement: "kWh"
              decimals: 1

Please make sure all of this applies and check the checkboxes, by writing "X" inside of them.

flixlix commented 1 year ago

Fixed in version 0.1.7! 🥳

cpohli commented 1 year ago

Oh man, that was like the fastest bug fix ever! :-)

Works like a charm now. Thank you very much!