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

Using "default" option: a header is only shown when "name" is defined explicitly (+styling lost) #302

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

Comments

@ildar170975
Copy link

ildar170975 commented May 30, 2023

Consider this code:

type: entities:
entities:
      - type: custom:multiple-entity-row
        entity: sun.sun
        name: 'hide_unavailable: false'
        entities:
          - entity: sensor.testing_availability
        show_state: false

      - type: custom:multiple-entity-row
        entity: sun.sun
        name: 'hide_unavailable: true'
        entities:
          - entity: sensor.testing_availability
            hide_unavailable: true
        show_state: false

      - type: custom:multiple-entity-row
        entity: sun.sun
        name: 'hide_unavailable: true'
        entities:
          - entity: sensor.testing_availability
            hide_unavailable: true
            default: xxx
        show_state: false

      - type: custom:multiple-entity-row
        entity: sun.sun
        name: 'hide_unavailable: true'
        entities:
          - entity: sensor.testing_availability
            hide_unavailable: true
            default: xxx
            name: some_name
        show_state: false

where sensor.testing_availability is a sensor which may become unavailable.
Here the results:

image

image

If the entity is hidden AND default is set -> then:

  1. If name is NOT defined explicitly:
    -header is NOT shown
    -styling IS lost.
  2. If name is defined explicitly:
    -header is shown
    -styling is not lost.

IMHO:

  1. A header must be displayed if default value is displayed (unless it is explicitly hidden by name: false).
  2. Styling should be persistent.
@ildar170975
Copy link
Author

Similarly - a name: false option does not work:

  - type: custom:multiple-entity-row
    entity: sun.sun
    entities:
      - entity: sensor.testing_availability
        name: false
        hide_unavailable: true
        default: xxx

      - entity: sensor.testing_availability
        name: some_name
        hide_unavailable: true
        default: yyy

      - entity: sensor.testing_availability
        hide_unavailable: true
        default: zzz

    show_state: false

изображение

изображение

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