benct / lovelace-multiple-entity-row

Show multiple entity states and attributes on entity rows in Home Assistant's Lovelace UI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"invert", "kilo" & "posiition" formatters: precision is lost

ildar170975 opened this issue · comments

There is an input_number entity:
image

Consider this card:

  - type: entities
    entities:
      - entity: input_number.test_negative_1
        name: test value

      - type: custom:multiple-entity-row
        entity: sun.sun
        entities:
          - entity: input_number.test_negative_1
            name: unformatted
        show_state: false

      - type: custom:multiple-entity-row
        entity: sun.sun
        entities:
          - entity: input_number.test_negative_1
            name: invert
            format: invert
        show_state: false

image

The entity has ".xxxx" precision, the inverted value has ".xx" precision.


Example with a template sensor:
image

type: entities
entities:
  - entity: sensor.test_value
    name: test value
  - type: custom:multiple-entity-row
    entity: sun.sun
    entities:
      - entity: sensor.test_value
        name: unformatted
    show_state: false
  - type: custom:multiple-entity-row
    entity: sun.sun
    entities:
      - entity: sensor.test_value
        name: invert
        format: invert
    show_state: false

image

Same - precision changed to ".xx".

Same about kilo & position formatters:

    type: entities
    entities:
      - entity: sensor.test_value
        name: test value
      - type: custom:multiple-entity-row
        entity: sun.sun
        entities:
          - entity: sensor.test_value
            name: unformatted
        show_state: false
      - type: custom:multiple-entity-row
        entity: sun.sun
        entities:
          - entity: sensor.test_value
            name: kilo
            format: kilo
        show_state: false
      - type: custom:multiple-entity-row
        entity: sun.sun
        entities:
          - entity: sensor.test_value
            name: position
            format: position
        show_state: false

image