I’m trying to have a a vacuum automation toggle (so auto-cleaning can be overridden) with a secondary row displaying the vacuum entity’s “last changed” attribute.
I’m using Canary to get a secondary info row to display a different entity’s attributes with this:
- entity: automation.vacuum_cleanup_if_nobody_is_home
icon: phu:roborock
name: Vacuum if nobody home
secondary_info:
entity: vacuum.xiaomi_vacuum_cleaner
attribute: clean_stop #this is the vacuum entity's attribute with last cleanup
That gives me this:
Which is an absolute date/time of the last cleanup. That’s something but I’d love to have “xxx days/hourse/whatever ago”.
Basically i want a “last changed” attribute (that works fine when I’m just using the vacuum entity card but not when I’m trying to have two different entities - the automation and the vacuum - on the same card). When i tried “attribute: last-changed” in the above script, that didn’t work.
Or, at least, how do I clean this up so it just shows a date? I tried reading up on templates but as a non-programmer, it goes right over my head. Thanks!