lovelace-multiple-entity-row
lovelace-multiple-entity-row copied to clipboard
Using "default" option: a header is only shown when "name" is defined explicitly (+styling lost)
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:
If the entity is hidden AND default is set -> then:
- If
nameis NOT defined explicitly: -header is NOT shown -styling IS lost. - If
nameis defined explicitly: -header is shown -styling is not lost.
IMHO:
- A header must be displayed if
defaultvalue is displayed (unless it is explicitly hidden byname: false). - Styling should be persistent.
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