Lovelace: Home Feed Card

Trying to make a History feed to see when the cat toilet is used and cleaned. But it is some problems.

  1. Why is the history not longer when there is more history?
  2. Where are the “May 11, 00:00” states from? I can’t see them in the log

type: custom:home-feed-card
max_item_count: 50
title: Historikk
entities:
  - entity: input_boolean.cat_toilet_in_use
    include_history: true
    max_history: 50
    format: datetime
    remove_repeats: false
    content_template: The cat toilet is used
    exclude_states:
      - 'on'
  - entity: input_boolean.cat_toilet_need_emptying
    name: Trenger tømming
    include_history: true
    max_history: 50
    format: datetime
    remove_repeats: false
    content_template: The cat toilet is cleaned
    exclude_states:
      - 'on'

EDIT: I can se that this issue is exact what guy0nabuffalo is describing above my post.

@flemmingss @guy0nabuffalo

As per documentation:

This currently uses the history for the last day.

Right, but there is also an option for history_days_back which should show days previous to the current day. I have mine set to 5 but I’m still only seeing the current day.

I noticed after posting there is already an issue opened for the entry that is appearing at midnight.

I opened an issue on GitHub as well, I should really rename it to a problem with history_days_back

I agree that documentation is not very clear, but I seem to understand that history_days_back is applicable to Calendar events and not to Entity object.

Documentation shows there is an option specifically for the calendar called calendar_days_back

sub’d… nice card, nice work!

I’m trying to integrate the Home Feed card into a mushroom based UI driven by simplicity. The idea is to get notified at the home page of any issues found in the system - issues found from devices, entities I specify as being of interest.

Idea: The home page has a chip for notifications. image
It turns red and shows a number corresponding to the number of events found (event based or time based). These events are stored in a dynamic list the home feed card displays:

  • Event based | Example: The battery level of a sensor drops below a threshold and needs to be shown in the home feed for action
  • Time based | Every night at say 10pm I run a “security check” (doors locked, windows closed, garage closed etc.); any issues found make their way into the home feed card for action

Note: If event based notifications are too difficult I’m ok with a time based feed to start with

Clicking on the chip opens up the home feed card (understand it’s not mushroom formatted but that’s a detail I’m willing to forgo at this point).

Looking at the GitHub page I understand I could build a home feed using all entities in scope but somehow need to filter by state or some other logic. What’s the purpose of the ‘notification ID’ and how is it controlled so it becomes useful for the home feed card? How else would I create a dynamic list of entities that get displayed in the home feed card?

id_filter (optional)
This is a regular expression for filtering persistent notifications by notification id. In the example above, "^home_feed_.*" will result in only notifications with ids starting with home_feed_ from being displayed.

Has anyone else built such a notification regime?

Anyone know how to not get blank labels almost 90% of the time on every device I own with this card?
If I refresh the page or navigate in and out of the page the labels will show up again. It’s frustrating.

custom


type: custom:home-feed-card
title: null
show_empty: false
scrollbars_enabled: false
max_item_count: 6
entities:
  - entity: binary_sensor.ent_wall_pir
    icon: mdi:radiobox-blank
    name: EnPr

@spudje Can you tell me how you did this? I want the same, but i only get popups with the entity

FYI, I was using this card for a long time, but found layout issues frustrating. I ended up switching to the Logbook card and it’s working better.

I have the following code setup which shows this.

Can anyone help remve the section with the time updated text (28 Minutes ago) please? I’d like to remove that information as it’s not important.

type: custom:home-feed-card
entities:
  - entity: sensor.garbage
    name: Black bin
    content_template: '{{display_name}} {{state}}'
    exclude_attributes: Last update
    show_empty: true
  - entity: sensor.recycle
    name: Blue Bin
    content_template: '{{display_name}} {{state}}'
    show_empty: true
  - entity: sensor.organic
    name: Green Bin
    content_template: '{{display_name}} {{state}}'
    show_empty: true

image

Thanks to @Steven_Rollason for creating this card.

I figured out how to use it to create a list of recently played media player songs and when they played

I used this template sensor that I added to configuration.yaml

template:
  - sensor:
      - name: "Spotify Song & Artist"
        state: >
          {%  if state_attr('media_player.spotify_dan', 'media_title') != none -%}
          {{ state_attr('media_player.spotify_dan', 'media_title') }}  |  {{ state_attr('media_player.spotify_dan', 'media_artist') }}
          {%- endif %}
        icon: mdi:format-list-bulleted

And the Home Feed Card with these settings on my dashboard

type: custom:home-feed-card
title: Spotify Recently Played
show_empty: false
scrollbars_enabled: false
more_info_on_tap: true
state_color: true
compact_mode: true
entities:
  - entity: sensor.spotify_song_artist
    include_history: true
    max_history: 25
    format: time
    content_template: '{{state}}'

Cheers!

@tfmeier did you manage to get this done ? i like the idea and would love to impliment it

When i use

  • entity: automation. ________________
    Then i can display only last triggering time.
    If i add include_history: true then it disappears suddenly.

Hello,

This card seems to be nearly perfect for checking if a battery in a device is still working.
Use the card to see how long ago the battery level is updated.
The only thing I should like then: the devices with the longest no-update on top, instead of the one with the moost recent update.
Is it possible to chsnge the order?

I now get:

But I want the first one displayed as last one.

I am having exectly the same problem at my Amazon tablets.
It worked smoothly untill the last update. After the last update I get blank notifications.

Anyone else facing the same issue??

1 Like

I feel like I am missing something obvious here — but is there a way to limit my list to ONLY calendar events? I thought I had it worked out but now when i restart HA I get other alerts popping up
(Screenshot).

      - type: custom:home-feed-card
        title: null
        show_empty: true
        max_item_count: 2
        calendar_days_forward: 90
        calendars:
          - calendar.randallbrobson1_gmail_com
          - calendar.holidays_in_united_states
        id_filter: null
        entities: []
        card_mod:
          style: |
            ha-card {
              border: solid 0px;
              margin-left: 10px;
              margin-right: 10px;
              font-size: 16px;`

What might be the reason for the card to update feed so slowly. Entity that I’m using receives notification which I view on feed card. 3 times out of 10 goes to feed immediately. Rest will not update automatically and I need to open card manually. After that it refreshes and shows all messages that it received.

Are you using the sidebar card from DBuit?
How did you get the home feed card inside it?
I would love to have it too.