TarheelGrad1998 / files

Custom Component for Home Assistant that reads a list of files from a directory into a sensor. Pre requisite for the Gallery Card.
10 stars 8 forks source link

Cofiguration.yaml code doesnt work. #12

Open kelvincabaldo07 opened 2 years ago

kelvincabaldo07 commented 2 years ago

when i add the config yaml line. it says end of the stream or a document separator is expected. see screenshot https://imgur.com/a/cQk51dS Screenshot_20220120_184043

TarheelGrad1998 commented 2 years ago

Hrm, that would seem to indicate an issue elsewhere in your config file.

Do you have a sensor section elsewhere? I think you can have only one, which you'd need to put the new platform section under that.

BTW, what is generating those errors? Is that something in VS Code or similar?

WesleyLiekens commented 2 years ago

I get the same error.

i have these in configuration.yaml sensor: !include sensors.yaml

and in sensors.yaml

Dobbiiey commented 1 year ago

could you test following style?

files:
  - sensor:
      - name: gallery_images
        folder: /config/www/images
        filter: "**/*.jpg"
        sort: date
        recursive: True