Showing a history of sensors triggered

It’s been quite a few months but I wanted to circle back on this post and take @Mariusthvdb up on his offer. Would love to see how you managed to make this happen.

I’ve got 2 use cases I would like to adapt this to:

  1. To see how a group of (9) sensors are triggered in order (would like like to see if the same sensor is triggered multiple times).
  2. To see the history of 1 particular sensor. This one sensor gets “text” fed to it, and would like to see what the text is, and when it occurrs.

Does logbook not work for that?

Yes, it does. I’m just looking for something to be displayed on the front end in a markup card.
Would like for it to be displayed like what was created in the other thread linked to with the time, how long ago, and the actual text

sorry, been busy elsewhere in the communities… was this it? not sure if you want recently triggered automations, or last triggered sensors:

  - type: custom:auto-entities
    card:
      type: entities
      title: Running Automations
      show_header_toggle: false
    filter:
      include:
        - domain: automation
#          state: 'on'
          not:
            attributes:
              current: 0
          options:
            type: custom:template-entity-row
            toggle: true
            secondary: >
              {{relative_time(state_attr(config.entity,'last_triggered'))}} ago,
              {{state_attr(config.entity,'current') }} Running
            hold_action: |
              {
                "action": "navigate",
                "navigation_path": "/config/automation/trace/{{state_attr(config.entity,'friendly_name')}}"
              }
    sort:
      method: last_triggered
      reverse: true

  - type: custom:auto-entities
    card:
      type: entities
      title: Recent Automations
      show_header_toggle: false
    filter:
      include:
        - domain: automation
          state: 'on'
          last_triggered: '<= 5'
#          not:
#            attributes:
#              current: 0
          options:
            type: custom:template-entity-row
            toggle: true
            secondary: >
              {% if state_attr(config.entity,'last_triggered') %}
              {{relative_time(state_attr(config.entity,'last_triggered'))}} ago
              {% else %} Never triggered
              {% endif %}
            hold_action: |
              {
                "action": "navigate",
                "navigation_path": "/config/automation/trace/{{state_attr(config.entity,'friendly_name')}}"
              }
#              action: navigate
#              navigation_path: /config/automation/dashboard
      exclude:
        - attributes:
            last_triggered: null
    sort:
      method: last_triggered
      reverse: true

  - type: custom:auto-entities
    card:
      type: entities
      title: All Automations on
      show_header_toggle: false
    filter:
      include:
        - domain: automation
          state: 'on'
          last_triggered: '> 5'
          options:
            type: custom:template-entity-row
            toggle: true
            #active: '{{ (state_attr(config.entity, ''current'') | int) > 0 }}'
            secondary: |
              {%- if state_attr(config.entity, 'last_triggered') -%}
                {{ relative_time(state_attr(config.entity, 'last_triggered')) }} ago
              {%- else -%}
                Never triggered
              {%- endif -%}
            hold_action: |
              {
                "action": "navigate",
                "navigation_path": "/config/automation/trace/{{ config.entity.split('.')[1] }}"
              }
      exclude:
        - attributes:
            last_triggered: null
    sort:
      method: last_triggered
      reverse: true

  - type: custom:auto-entities
    card:
      type: entities
      title: Automations off
      show_header_toggle: false
    filter:
      include:
        - domain: automation
          state: 'off'
          options:
            secondary_info: last-triggered
      exclude:
        - attributes:
            last_triggered: null
    sort:
      method: last_triggered
      reverse: true

  - type: custom:auto-entities
    card:
      type: entities
      title: Automations off never triggered
      show_header_toggle: false
    filter:
      include:
        - domain: automation
          state: 'off'
          attributes:
            last_triggered: null

  - type: custom:auto-entities
    card:
      type: entities
      title: Automations on never triggered
      show_header_toggle: false
    filter:
#      template: >
#         [
#          {% for e in states.automation|selectattr('state','eq','on')
#                                         |map(attribute='entity_id')|list %}
#          { 'entity': '{{e}}', 'secondary_info': 'last-triggered' },
#          {% endfor %}
#          ]

      include:
        - domain: automation
          state: 'on'
          attributes:
            last_triggered: null
          options:
            type: custom:template-entity-row
            toggle: true
            secondary: >
              {% if state_attr(config.entity,'last_triggered') %}
              {{relative_time(state_attr(config.entity,'last_triggered'))}} ago
              {% else %} Never triggered
              {% endif %}
            hold_action: |
              {
                "action": "navigate",
                "navigation_path": "/config/automation/trace/{{state_attr(config.entity,'friendly_name')}}"
              }
#
#    sort:
#      method: last_triggered
#      reverse: true

  - type: custom:auto-entities
    card:
      type: entities
      title: All Scripts
      show_header_toggle: false
    filter:
      include:
        - domain: script
          options:
            secondary_info: last-triggered
      exclude:
        - attributes:
            last_triggered: null
    sort:
      method: attribute
      attribute: last_triggered
      reverse: true

thanks Marius, I looked at the auto-entities card and still reading through the release thread and your samples above.