Lovelace: Home Feed Card

Yep, that fixed it! Thanks!

Another request: :wink: if format (like datetime) could be set for all entities that will be good, now it is a setting for each individual entity

Are you using exclude_states to exclude the “off” state for those entities? If so, try setting remove_repeats to false as well. Without doing this it would be excluding all but the first “on” state for each entity in the last 24 hours.

I just did a reinstall of Hassio and am now having difficulties in getting home feed to work.

I installed with HACS and the directions there say to add the following in the raw editor:

- url: /community_plugin/lovelace-home-feed-card/lovelace-home-feed-card.js type: js
is resources missing from this direction?
The github directions say to do the following:

`resources:

  • url: /local/custom-lovelace/home-feed-card/lovelace-home-feed-card.js?v=0.0.0
    type: js`

with the files going to config\www/custom-lovelace/home-feed-card\

The Hacs install puts the files in the folder config\www\community\lovelace-home-feed-card
I have created both directories and tried both urls and get the following error on a simple card:
"custom element doesn’t exist: home-feed-card after using

type: 'custom: home-feed-card'

I know the custom feed card works as I was using it last week with no problem. Which setup do I need to follow to get it working again?
Thanks

In the raw editor, the URL needs to be added under the resources section so it should look something like this:

resources:
  - url: /community_plugin/lovelace-home-feed-card/lovelace-home-feed-card.js
    type: js

(You only need the resources section once so, if it is already there you just need to add the url to the existing section).

Also, it may just be a typo in your post, but it looks like you have a space in the card type. It should just be ‘custom:home-feed-card’ and not ‘custom: home-feed-card’

Thank you for the quick response. I changed it to what you called out above and removed the space. Same error. Card doesn’t exist. Is this the local file still? If so, this is a different directory than HACS installed it to.
Tried again this morning and it now works.
Still a little confused on the path call out and where the file belongs in my directory structure.

Everything was working correctly no more errors and than after several hours it is not visible in HA. I can edit it, no errors, but no display.

What does your config look like? It may be that it isn’t finding anything to display but, without seeing the config, I can’t tell what the issue is.

Also, you say there are no errors. Does that include in the browser developer tools JavaScript console?

Wh I said no more errors, I was referring to custom element doesn’t exist.
The custom card is:
’
calendars:

  • calendar.bschatzow_gmail_com
    entities:
  • entity: binary_sensor.wyzesense_779324f0
  • entity: binary_sensor.wyzesense_778a7342
  • entity: device_tracker.bill_pixel_gps
    show_empty: true
    title: Home Feed
    type: ‘custom:home-feed-card’ `

I am still confused on the resources path called out.
/community_plugin/lovelace-home-feed-card/lovelace-home-feed-card.js
I read this is that the js file needs to be in a directory under www/community_plugin. This is not where HACS installs the file.

Also this card works on my android tablet with Chrome, but not on my windows 10 with chrome. Both are at the latest version. Maybe a js problem with chrome? Strange as there were no windows updates last week and it was working great. Tried clearing cache, etc no difference.

Can you try opening the Chrome Developer Tools (Ctrl+Shift+I or F12) and see if any error messages appear in the Console tab?

Does your config look this this (I think the formatting of your config has got a bit messed up in your post)?

calendars:
  - calendar.bschatzow_gmail_com
entities:
  - entity: binary_sensor.wyzesense_779324f0
  - entity: binary_sensor.wyzesense_778a7342
  - entity: device_tracker.bill_pixel_gps
show_empty: true
title: Home Feed
type: 'custom:home-feed-card'

I am still confused on the resources path called out.
/community_plugin/lovelace-home-feed-card/lovelace-home-feed-card.js
I read this is that the js file needs to be in a directory under www/community_plugin. This is not where HACS installs the file.

HACS downloads the files to www/community
/community_plugin is a URL which HACS maps to that location. This allows it to avoid issues with caching, without that you would need to add a version number to the end of the URL when there is a new version.

Thanks. The formatting did get messed up. I did use the
before I pasted For some reason the - got changed to bullets. I just saw that you need three ` for correct formatting. At least one problem resolved.

On HACS each developer creates a map for their file? Not sure how this is easier than having the url file point to the file and path name. I’m still so I’m sure there are valid reasons. I needed to just understand where stuff belongs. Many of the directions for custom cards have conflicting information. Makes it hard for new people to understand what is correct. Again, thanks for the card, it works great and your willingness to help. Some cards have -type were others have - url. Not sure which is the correct way.

On Chrome console, what am I looking for.
This is what it shows.

Access to script at 'https://unpkg.com/[email protected]/src/lib/units/hour?module' from origin 'https://bschatzow.duckdns.org:8123' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'http://hassio.local:8123' that is not equal to the supplied origin.
hour:1 Failed to load resource: net::ERR_FAILED
2default_view:1 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: https://unpkg.com/[email protected]/src/moment.js?module
4lovelace-home-feed-card.js:39 Loaded custom-card-helpers module.
2default_view:1 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: https://unpkg.com/[email protected]/src/moment.js?module
Promise.then (async)
loadModules @ lovelace-home-feed-card.js:25
HomeFeedCard @ lovelace-home-feed-card.js:20
fa @ create-card-element.ts:71
ya @ create-card-element.ts:98
value @ hui-view.ts:60
(anonymous) @ hui-view.ts:286
value @ hui-view.ts:285
value @ hui-view.ts:214
performUpdate @ updating-element.js:526
_enqueueUpdate @ updating-element.js:460
async function (async)
_enqueueUpdate @ updating-element.js:446
_requestUpdate @ updating-element.js:413
initialize @ updating-element.js:268
initialize @ lit-element.js:95
O @ updating-element.js:98
V @ lit-element.js:46
r @ hui-view.ts:50
value @ hui-root.ts:652
(anonymous) @ hui-root.ts:492
setTimeout (async)
(anonymous) @ render-status.ts:2
(anonymous) @ web-animations-next-lite.min.js:15
requestAnimationFrame (async)
(anonymous) @ web-animations-next-lite.min.js:15
r @ render-status.ts:2
value @ hui-root.ts:492
performUpdate @ updating-element.js:526
_enqueueUpdate @ updating-element.js:460
async function (async)
_enqueueUpdate @ updating-element.js:446
_requestUpdate @ updating-element.js:413
set @ updating-element.js:166
commit @ parts.js:368
commit @ parts.js:111
update @ template-instance.js:40
__commitTemplateResult @ parts.js:236
commit @ parts.js:186
s @ render.js:44
V.render @ shady-render.js:251
update @ lit-element.js:166
performUpdate @ updating-element.js:508
_enqueueUpdate @ updating-element.js:460
async function (async)
_enqueueUpdate @ updating-element.js:446
_requestUpdate @ updating-element.js:413
set @ updating-element.js:166
value @ ha-panel-lovelace.ts:310
setEditMode @ ha-panel-lovelace.ts:277
value @ hui-root.ts:541
handleEvent @ parts.js:434
__boundHandleEvent @ parts.js:400
F @ gestures.js:662
q @ gestures.js:1058
click @ gestures.js:1017
N @ gestures.js:450
lovelace-home-feed-card.js:39 Loaded custom-card-helpers module.
default_view:1 Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: https://unpkg.com/[email protected]/src/moment.js?module
'``
I don't know if this shows the problem and if it does, how to fix it.

Has all of the new features been added to the readme on github? I am not seeing anywhere to enable compact mode. Unless I am blind, I am not seeing updates to the documentation.

Suddenly the custom card stopped to work without any entries in the logfile…
Simply doesn’t show anymore what i put inside the configuration.
Is anyone else experimenting this?

Are you getting errors like this in the Javascript console?

Access to script at '...' has been blocked by CORS policy

if so, there was a problem with unpkg.com which, although it has been fixed, it looks like some packages need to be cleared from the cache on their server. I’ve asked for the moment package to be cleared so that should hopefully fix it.

1 Like

The new beta features are from the experimental branch. You can access the readme file here:

Yes, in the console that’s the error, so i hope it will be fixed soon! Thanks!

Can you also try clearing the cache in the browser? I think this may now be resolved in the unpkg CDN (they seem to be loading correctly for me in my own setup) but the responses have the Cache-Control max-age set to 1 year so the browser may still be caching an old response.

I cleared cache and still doesn’t show on PC. Works on Android. Both Chrome browsers.

Same here… works on tablet and mobile but not on PC.

Is this better now? I’ve had confirmation that the Moment module has been cleared in the unpkg cache.
If it still doesn’t work after cleaning your browser cache please let me know the details of the error in the console in case it’s a different module or some other issue.