power-flow-card-plus icon indicating copy to clipboard operation
power-flow-card-plus copied to clipboard

[BUG] v0.2.2: Individual 1 doesn't show unit of measurement when 0

Open cpohli opened this issue 10 months ago • 4 comments

Describe the bug Now that (thanks to #567) the display zero is shown, it is missing the unit of measurement when the value actually IS zero.

Expected behavior Even when the secondary sensor value is zero, the 0 AND unit of measurement should be shown.

Screenshots image

My code is looking like this:

          individual:
            - entity: sensor.smaev_3013072337_charging_station_power
              unit_white_space: true
              name: Wallbox
              display_zero: true
              secondary_info:
                display_zero: true
                unit_white_space: true
                unit_of_measurement: 'kWh'
                decimals: 1
                accept_negative: false
                entity: sensor.wallbox_daily_kwh
              icon: mdi:car-arrow-left
              color_icon: false
              color:
                - 221
                - 14
                - 24

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

  • [x] I understand that this is a channel for reporting bugs, not a support forum (If you need help configuring the card, go to: Discussions).

  • [x] I have the latest version of the card installed.

  • [x] I have cleared my browser cache after installing, updating and configuring the card.

  • [x] The issue is not related to the UI-Editor not being rendered: "s.entries is not a function". This is a known bug, and is caused by Card Mod. Check the warning this readme section for more information on how to fix it.

cpohli avatar Apr 22 '24 07:04 cpohli

Just about to post the same, when 0 the unit is ignored.

image image

ma9mwah avatar Apr 22 '24 07:04 ma9mwah

@flixlix Same issue here, unit_of_measurement not displayed when value is 0 (display_zero: true).

image

dr3amr avatar Apr 24 '24 07:04 dr3amr

I can confirm this too. image

philippk80 avatar Apr 24 '24 12:04 philippk80

@flixlix can current issue be taken into account to be fixed in next update please ?

dr3amr avatar Sep 02 '24 07:09 dr3amr