Open ildar170975 opened 2 years ago
See https://github.com/benct/lovelace-multiple-entity-row/pull/212#issuecomment-997214320 and following. Might be related to the same root cause.
Introduced with v4.3.0 I think.
Guess I missed numberFormat
on invert
and position
. Anything else?
Anything else?
No, I think only these two options are with problems.
Confirm (Win10x64, Chrome):
The conventional entity-row has wrong format (frontend issue).
Have a look at https://community.home-assistant.io/t/multiple-entity-row-card-local-number-formatting-update-broke-view/370718 for examples when this local number awareness feature is going too far.
Here is one more issue - again formatting does not work.
There are 2 sensors from systemmonitor
:
This sensor is a sum of those sensors:
- platform: template
sensors:
memory_total:
unit_of_measurement: MB
icon_template: mdi:chip
value_template: >-
{% set FREE = 'sensor.memory_free' -%}
{%- set USE = 'sensor.memory_use'-%}
{{ ((states(FREE)|float) + (states(USE)|float)) | round(1) }}
And here is a card:
- type: entities
entities:
- entity: sensor.memory_free
- entity: sensor.memory_use
- entity: sensor.memory_total
- type: custom:multiple-entity-row
entity: sun.sun
entities:
- entity: sensor.memory_free
name: free
- entity: sensor.memory_free
name: free
unit: false
- entity: sensor.memory_use
name: use
- entity: sensor.memory_total
name: total
unit: false
- entity: sensor.memory_total
name: total
show_state: false
The same value is displayed differently if it is w/o unit:
My guess that it could be connected to using round(...)
function in value_template
.
Current settings:
Not quite sure how to fix this, as the problem lies in HA's compute_state_display
function which uses formatNumber
on states that have a unit_of_measurement
or state_class
. Removing or having no unit prevents it from running the formatting.
Potential workaround while I figure this out:
unit: false
if you dont want the value formattedunit: ' '
if you need the formattingI think that unit: false
is not the same as "no unit_of_measurement is specified": the 1st is a frontend setting (display the unit or not), the 2nd is a core system stuff.
Probably this function should not depend on frontend setting...
2023.5.4, still same issue with a template sensor:
unit: false
)Wow, it's been only 3 years. Let's wait another 3 to fix this. Maybe.
Bump
The card should use global format settings:
This card contains:
input_number
row;multiple-entity-row
with the same row with different formats.Note that:
multiple-entity-row
displays WRONG format in some cases.Now, lets choose "None" format:
The card now shows RIGHT format: