MQTT Message history displayed in lovelace

I have an MQTT integration:

  - platform: mqtt
    name: sip2mqtt
    state_topic: "home/sip"
    value_template: '{{ value_json.verb }}'
    json_attributes_topic: "home/sip"
  - platform: mqtt
    name: "SIP callid"
    state_topic: "home/sip"
    value_template: '{{ value_json.caller }}'

And it shows like this in lovelace:

When a new MQTT message comes in, the word “disconnected” changes to “incoming”, and the CallerID shows the data I’m interested in. Perfect.

The issue is it only flashes the message for 1/2 second, and then the MQTT message goes back to “disconnected” and the callerID is blank. I can’t make it stay around longer… its just the nature of it (we have to answer the call eventually, and when we do, the system drops the connection that drives the mqtt script)

What I really want is a list of the 10 most recent callers, the most frequent caller today, etc. I assume I can just poll the history, go to the last time the state changed, and display the data. But I have no clue how to implement that!


Home feed card can show you the last x number of callers:

looks promising but I can’t figure it out. It seems like the only way to get it to show multiple entries for a single item is

it should work with any entity which has an attribute which is a list of objects.

My entity doesn’t have any attributes, the value is just a string and that’s all I’ve got.

It works with states too. I had a list of last activated motion sensors for a while. Ask in the thread and Steven will be able to help.

you’re right…

I was going off the github instructions instead of the forum post. Thanks!! totally solved this for me!

1 Like

Can you share your card config, I’m looking to do the same but struggling to figure it out!
EDIT: I did it, needed the " multiple_items: true":

type: 'custom:home-feed-card'
title: ZigBee Updater Log
  - entity: sensor.zigbee_bridge_update_log
    multiple_items: true
    max_history: 10
    include_history: true
    scrollbars_enabled: true
1 Like

@VinistoisR please share also the solution for others who wants to know, like me