Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ildar170975 opened this issue May 30, 2023 · 1 comment
Open

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

ildar170975 opened this issue May 30, 2023 · 1 comment

Comments

@ildar170975
Copy link

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".

@ildar170975
Copy link
Author

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

@ildar170975 ildar170975 changed the title "invert" formatter: precision is lost "invert", "kilo" & "posiition" formatters: precision is lost May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant