gadgetchnnel / lovelace-home-feed-card

A custom Lovelace card for displaying a combination of persistent notifications, calendar events, and entities in the style of a feed.
275 stars 24 forks source link

"error handling" when listing entities that do not exist #25

Closed lolouk44 closed 4 years ago

lolouk44 commented 4 years ago

I have a list of entities I want to display in the feed, however if one of the entities listed does not exist, nothing is displayed at all. Can this be improved so that the feed still displays, but maybe throw an alert on the card?

gadgetchnnel commented 4 years ago

@lolouk44 This should now be in the latest beta version (0.3.5b3).It will display the standard "Entity not available" message like the default Lovelace cards, like entities.

lolouk44 commented 4 years ago

Thanks @gadgetchnnel. Will try and feed back

lolouk44 commented 4 years ago

@gadgetchnnel Doesnt' seem to work? Just added a "fake" entity to my list of entity ids and nothing gets displayed:

  - type: custom:home-feed-card
    title: Sensors Activity Feed
    show_empty: true
    more_info_on_tap: true
    max_item_count: 99
    entities:
        - binary_sensor.alert_aloe_vera_battery_too_low
        - binary_sensor.alert_aloe_vera_humidity_too_low
        - binary_sensor.alert_aloe_vera_humidity_too_low2 <-- fake entity_id
gadgetchnnel commented 4 years ago

@lolouk44 Are you definitely on the beta version 0.3.5b3? Does the details page in HACS look like this when you click the menu in the top-right corner:

Screenshot 2020-01-08 at 19 53 45

If the menu shows Show beta rather than *Hide beta you will need to click that to show the beta version in the dropdown.

I've tested your config and (since I don't have any of those entities) this is what I see:

Screenshot 2020-01-08 at 19 49 56

lolouk44 commented 4 years ago

yup defo on the latest beta: image

[edit] just tried to refresh the page (F5) in addition to doing a refresh via the ... (top right) and that worked. Normally I only need to use the UI refresh when I make changes to my lovelace config. All good, thanks again for the quick enhancement, really good stuff :)