lovelace-multiple-entity-row
lovelace-multiple-entity-row copied to clipboard
#221: Support last-changed/last-updated as secondary_info attribute
This change allows to use all direct properties of an stateObj as secondary_info. This is useful to support custom formatting for last-changed/last-updated
Config-Example:
entity: binary_sensor.my_sensor
name: Main Door
type: custom:multiple-entity-row
secondary_info:
attribute: last_changed
format: datetime
Maybe it would make sense to also change entityStateDisplay in entity.js? The following line also does not allow us to use last_changed/last_updated:
let value = config.attribute ? stateObj.attributes[config.attribute] : stateObj.state;
could be changed to
let value = config.attribute
? stateObj.attributes[config.attribute] ?? stateObj.attributes[config.attribute]
: stateObj.state;
If you like I can add this change to the PR
Hello! Is there a reason for this PR not being merged or just that it´s an outdated repo no longer being maintained?
These changes has unfortunately resulted in some conflicts with other PRs, so I'll try to add it manually for the next release. Thanks.