Lovelace: Home Feed Card

Sorry for the late reply, but where do you have the custom-lovelace-folder? It should look something like this:

HA Config folder    
|
|___www
    |___lovelace-custom
        |___lovelace-home-feed-card
               lovelace-home-feed-card.js
               etc.

Also, the latest version requires more files than just lovelace-home-feed-card.js, there are several other Javascript files it references (fecha.js, moment.js, and custom-card-helpers.js) and all those will need to be in the folder for it to work,

If all that is correct, please check for error messages in the Javascript console of your browser. Errors will most likely appear there rather than in home-assistant.log.

Iā€™ve had a request to be able to sort automations by their last triggered time instead of, as it does now, the last updated time. Iā€™d considered adding it as an option setting but, thinking about it, does it really make any sense to use anything but the last triggered time for automations? Also, unless an automation has been turned off, its state will always be ā€œOnā€. So, my proposal is to treat automations differently from any other entities and do the following:

  • Automations with a null last_triggered time will never show in the feed
  • The state of any other notifications will be hardcoded to ā€œTriggeredā€, so these will (unless overridden with a custom content_template) display as ā€œAutomation Name @ Triggeredā€

Does this make sense, or does anybody have a use case involving having the ā€œOnā€/ā€œOffā€ status showing in the feed or sorting by updated time?

Is it possible to have it not sort at all? On some of the uses of the card I would like to see the entities in the order that I put them in.

Is it possible to change the number of days that are shown from the Google calendar ?
Great job, I love the notifications integration !
Iā€™ve also seen that, when you donā€™t put a title, the alignment of the card is not perfect. With a title it is ok.

Iā€™m considering adding support for this, possibly via two options for the number of days in the past and in the future that calendar events will be fetched.

Iā€™ve also seen that, when you donā€™t put a title, the alignment of the card is not perfect. With a title it is ok.

Iā€™ve not been able to reproduce this issue, do you have a screenshot showing this? Please try updating to version 0.3.4 and see if this helps.

There have been two new beta releases:

0.3.5b1

Added special handling for automation entities. These are now handled slightly differently from other entities. The differences are as follows:

  • The last_triggered attribute is used for the timestamp rather than the last_changed attribute, allowing them to be sorted by when they were triggered
  • Automations which have never been triggered ( last_triggered is None) will be excluded
  • The state of automations will always be ā€œTriggeredā€, so will display by default as ā€œAutomation Name @ Triggeredā€ in the feed (this can be overridden as normal using the content_template option)

Note: Although you can use the include_history option with automation entities, this doesnā€™t always work as expected as it seems that a change to last_triggered isnā€™t actually treated as a change to the entity in the History API.

Also, there is currently there is no way to prevent non-triggered automations from being excluded. Please let me know if you would like this, and I may be able to add an option.

0.3.5b2

Added options to control number of days of calendar events to display:

  • calendar_days_back (defaults to 0)
  • calendar_days_forward (defaults to 1)

For example:

type: 'custom:home-feed-card'
title: Home Feed
calendars:
  - calendar.home_calendar
calendar_days_back: 1
calendar_days_forward: 7

A new beta (0.3.5b3) has now been released. This resolves an issue where, if an entity included in the feed does not exists, this would prevent the feed from displaying. It will now display the standard ā€œEntity not availableā€ message as with the standard cards like entities.

Wonderful, wonderful card. One of most useful.

it that case would be a ā€œsimpleā€ entities card, no? You can use it instead of homefeed.

How does the id_filter work. Can I have a list of filters, since I have a unique id for every message?

And is it possible to get the message title into the feed with the message?

entities: null
id_filter: 
   -  ā€œ^water_sensor_*ā€
   - ā€œ^smoke_sensor_*ā€
   - ā€œ^sys_os_updateā€ 
   - ā€œ^sys_hacs_updateā€
   - ā€œ^sys_battery_warningā€
more_info_on_tap: true
show_empty: false
title: Hendelser
type: 'custom:home-feed-card'

How does the id_filter work. Can I have a list of filters, since I have a unique id for every message?

Although the card doesnā€™t accept multiple filters as a list, the filter is a regular expression so it is possible to create one which will match multiple ids using the pipe character (which is used as an ā€œorā€ operator in regular expressions). Check the config at the bottom for an example.

And is it possible to get the message title into the feed with the message?

This is possible with the show_notification_title option.

Try the following config:

id_filter: ^water_sensor_*|^smoke_sensor_*|^sys_os_update|^sys_hacs_update|^sys_battery_warning
show_notification_title: true
more_info_on_tap: true
show_empty: false
title: Hendelser
type: 'custom:home-feed-card'
1 Like

Is there anyway to make this addon show ALL entities?

You should be able to use auto-entities with my card to do that.

Iā€™ve just deployed a new release (0.3.7) with a fix for popups (when clicking on history items, calendar events, or notifications) when running on Home Assistant 0.105.*

Note: you may have briefly seen a version 0.3.6 with a fix for this. I deleted that fix when I found that it prevented the standard more-info popups from working, and this is an improved version of the same fix.

Another new relase, 0.3.8, which fixes an issue (donā€™t know if this is 0.105 related or if it has always been there) where history entities with changes in attributes would show the current value for that attribute (e.g. friendly_name) in the popup instead of the historical value.

Iā€™ve just release a new beta version, 0.3.9b1, which should hopefully fix the canā€™t define property ā€œexclude_statesā€: Object is not extensible" error if you use this card in HA 0.106

1 Like

After updating to the latest beta i get this error:

2020-02-21 12:02:10 ERROR (MainThread) [hacs] Tried to serve up '/config/www/community/lovelace-home-feed-card/moment.js' but it does not exist
2020-02-21 12:02:10 ERROR (MainThread) [hacs] Tried to serve up '/config/www/community/lovelace-home-feed-card/custom-card-helpers.js' but it does not exist
2020-02-21 12:09:42 ERROR (MainThread) [hacs] Tried to serve up '/config/www/community/lovelace-home-feed-card/moment.js' but it does not exist
2020-02-21 12:09:42 ERROR (MainThread) [hacs] Tried to serve up '/config/www/community/lovelace-home-feed-card/custom-card-helpers.js' but it does not exist

And in the console i get:

Switching back to the 0.3.8 i still get no card also after cleaning cachesā€¦
EDIT: after adding manually the files not found the card appears again. Maybe a HACS issue? it seems it doesnā€™t download all the necessary files.

Yes, there appears to be an issue with HACS not downloading all the files. Iā€™ve reported this on the HACS GitHub repo, so hopefully this can get fixed (it was previously working fine).

How do I navigate to a view from a content_template (navigation_path: /lovelace/living_room)?

content_template: '[Link to a view!](???)'

You should just be able to use:

content_template: '[Link to a view!](/lovelace/viewname)'

Here is an example I tried:

- entity: weather.dark_sky
  more_info_on_tap: false
  content_template: '[{{state}}](/lovelace/weather)'

(I set more_info_on_tap to false for that to prevent the more-info popup from displaying when clicking on the link)