List devices by last triggered?

I’m trying to add my 433mhz devices - which do not report back or anything…

The “Modified” or “Created” do not show anything other than when the device was added to Home Assistant - like the one I underlined here - that was triggered just now, but it’s still showing 6th March

I need the last triggered to be at the top - so I can trigger an uknown named device, then know that “this is dining room window”, etc.

Like the the one i have put an arrow to… I do not know what that is. What I would do is go to all my sensors, trigger them, and they would be at the top so i know what i have just triggered.

Any ideas?

These columns mainly shows a weather on Mars, i.e. something not related to a real time when these devices were created or modified by YOUR actions.

As for “last triggered” - this is not a proper term. Perhaps you meant “last changed” for a particular entity belonging to a device? And not all these entities can be changed directly by YOU (except buttons, alarm panels, …)

last changed would be fine. If they could be ordered by last changed?

Devices cannot be. Entities cannot be.
What you can do is sorting entities on a view in a custom card based on a custom auto-entities.

1 Like

That’s not an option for any of the lists.

You could do it in the Template Editor tool

{{ integration_entities('rfxtrx') | expand
| sort(attribute = 'last_changed', reverse=true) 
| map(attribute = 'entity_id') | list }}
1 Like

Thanks guys, by using both your replies - I used ChatGPT to combine your code, and your “custom” card idea to make this…

I’m suprised HA does not have something like this built in, but i’m guessing a lot of people do not use 433mhz devices now, so it’s easier to see what you have added.

For other newbies who find this in the future like me…

The last 20 items seen by RFXtrx:

Go to a Dashboard > click the + to “Add Card”, search for “Manual”, then paste the code…

type: markdown
title: RFXtrx Last Seen
content: |
  {% set entities = integration_entities('rfxtrx') | expand | sort(attribute='last_changed', reverse=true) %}
  {% for e in entities[:20] %}
  - **{{ device_attr(device_id(e.entity_id), 'name') or e.entity_id }}**  
    Last seen {{ relative_time(e.last_changed) }} ago
  {% endfor %}

Thanks for your help!

Why not trying auto-entities as was suggested?

        type: custom:auto-entities
        card:
          type: entities
        filter:
          include:
            - integration: SOME_INTEGRATION
              options:
                secondary_info: last-changed
        sort:
          method: last_changed

Markdown only allows you to see a list w/o a possibility to do smth with these entities.
And this card also allows to use the template proposed here for more complex customization.