Format: inconsistancy with "last-chaged" & "last-updated"
ildar170975 opened this issue · comments
ildar170975 commented
Assume we need to show a last-changed
(or last-updated
) inside a secondary_info with some formatter like datetime
.
Consider this card:
- type: custom:multiple-entity-row
entity: sun.sun
entities:
- entity: sun.sun
show_state: false
secondary_info:
attribute: last-changed
format: datetime
- type: custom:multiple-entity-row
entity: sun.sun
entities:
- entity: sun.sun
show_state: false
secondary_info:
attribute: last-updated
format: datetime
- type: custom:multiple-entity-row
entity: sun.sun
entities:
- entity: sun.sun
show_state: false
secondary_info:
attribute: last_changed
format: datetime
- type: custom:multiple-entity-row
entity: sun.sun
entities:
- entity: sun.sun
show_state: false
secondary_info:
attribute: last_updated
format: datetime
What we can see here:
- If attribute is specified like
last-changed
- thenformat
is ignored. - If attribute is specified like
last_changed
- thenformat
is applied.
ildar170975 commented
Same for formatting these attributes inside "entities":
- type: custom:multiple-entity-row
entity: sun.sun
secondary_info: format default
entities:
- attribute: last-changed
name: last-changed
- attribute: last-updated
name: last-updated
show_state: false
- type: custom:multiple-entity-row
entity: sun.sun
secondary_info: format datetime
entities:
- attribute: last-changed
name: last-changed
format: datetime
- attribute: last-updated
name: last-updated
format: datetime
show_state: false
- type: custom:multiple-entity-row
entity: sun.sun
secondary_info: format total
entities:
- attribute: last-changed
name: last-changed
format: total
- attribute: last-updated
name: last-updated
format: total
show_state: false
- type: custom:multiple-entity-row
entity: sun.sun
secondary_info: format datetime
entities:
- attribute: last_changed
name: last_changed
format: datetime
- attribute: last_updated
name: last_updated
format: datetime
show_state: false
- type: custom:multiple-entity-row
entity: sun.sun
secondary_info: format total
entities:
- attribute: last_changed
name: last_changed
format: total
- attribute: last_updated
name: last_updated
format: total
show_state: false