custom-components / feedparser

📰 RSS Feed Integration
MIT License
144 stars 32 forks source link

Cant get it to work in the list #3

Closed IIIdefconIII closed 6 years ago

IIIdefconIII commented 6 years ago

Hi hi,

I cant get it to work correctly, could you provide me an example? That would be great, struggling to get this working i have:


  - platform: feedparser
    sensors:
    name: Algemeen
    feed_url: 'https://www.nu.nl/rss/Algemeen'
    date_format: '%a, %b %d %I:%M %p'
    inclusions:
      - title
      - link
      - description
      - image
      - language
      - pubDate
    exclusions:
      - language

which gives me: https://imgur.com/a/2d8I72w

and i have in lovelace:

      - type: custom:list-card
        entity: sensor.algemeen
        title: Algemeen
        columns:
          - title: ''
            type: image
            add_link: link
            field: image
          - title: Title
            field: title
            style:
              - white-space: nowrap
          - title: Description
            field: description

which gives me: https://imgur.com/a/1cbrHmD

Where the 3 rss logos beneith are 3 sensors. but the list doesnt show correctly the rss feed. i addes the custom component and i added the list.py in the www folder.

Could you please help me out

iantrich commented 6 years ago

Your sensor only has title and link fields according to your first screenshot. That's why the card is failing to load. Remove the description column and it should work. I would remove language from the inclusions and then you don't need it in exclusions. I'll take a harder look tonight, hopefully, as description looks like it should be in the sensor based on the RSS feed.

IIIdefconIII commented 6 years ago

Your sensor only has title and link fields according to your first screenshot. That's why the card is failing to load. Remove the description column and it should work. I would remove language from the inclusions and then you don't need it in exclusions. I'll take a harder look tonight, hopefully, as description looks like it should be in the sensor based on the RSS feed.

thanks for that, i tried it and restarted ha but its still not showing things up, i might also need to delete the -image and - pubDate, i will try that first

EDIT: Tried this but still the same

going to play with the lovelace code, i might need another structure here

      - type: custom:list-card
        entity: sensor.engineering_feed
        title: Engineering Feed
        columns:
          - title: ''
            type: image
            add_link: link
            field: image
          - title: Title
            field: title
            style:
              - white-space: nowrap
          - title: Description
            field: description

EDIT 2: nothing to do with lovelace

IIIdefconIII commented 6 years ago

it was a lovelace thing: this works for me now

      - type: custom:list-card
        entity: sensor.algemeen
        title: Algemeen nieuws
        row_limit: 10
        columns:
          - title: ""
            field: title
            add_link: link
            style:
              - white-space: wrap
iantrich commented 6 years ago

Sorry i wasn’t clear. I was referring to the Lovelace card

On Tue, Oct 2, 2018 at 2:05 PM IIIdefconIII notifications@github.com wrote:

it was a lovelace thing: this works for me now

  - type: custom:list-card
    entity: sensor.algemeen
    title: Algemeen nieuws
    row_limit: 10
    columns:
      - title: ""
        field: title
        add_link: link
        style:
          - white-space: wrap

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/custom-components/sensor.feedparser/issues/3#issuecomment-426393648, or mute the thread https://github.com/notifications/unsubscribe-auth/ABOj95izvIhTgQ7JAbEbvNtgu_0f3bXRks5ug7j4gaJpZM4XAXhB .

--

Ian