How do I add "X minutes ago" to motion sensor card?

I’d like to be able to see the current state of my motions sensors, and also how long ago they changed state (basically the last time someone triggered a motion).

So something like the attached picture, but for a couple of motion sensors.

image

Image source: https://developers.home-assistant.io/docs/frontend_add_card

Any advice? None of the default cards seem to have this as a GUI option.

Add: secondary_info: “last-changed” after - entity: entity_name

Thanks, for helping out…
I try adding the code you suggested here;
image

As such;

"type: entities
entities:

  • entity: binary_sensor.motion_sensor_altan secondary_info: “last-changed”"

But I get this result;

“bad indentation of a sequence entry at line 3, column 61: … tion_sensor_altan secondary_info: “last-changed” ^”

- entity: sensor.dark_sky_temperature
  secondary_info: "last-changed"
2 Likes

Thanks Vlad - that worked!