File sensor never appears in list of entities

Hello all,

I think I’m missing something obvious here but whatever I do I cannot get a file sensor to appear in the entity states page, can any one spot what I am doing wrong?
Here is my config Hassio (69.1):

  1. created sensor.json text file inside config i.e. where configuration.yaml resides

  2. pasted in following text lines into sensor.json and saved, for purposes of testing:

{“temperature”: 21, “humidity”: 39}
{“temperature”: 22, “humidity”: 36}

  1. sensors.yaml ( all other sensors are working inside this include file )
- platform: file
  name: FileTemp
  file_path: sensor.json
  value_template: '{{ value_json.temperature }}'
  unit_of_measurement: '°C'
  1. configuration.yaml (under section homeassistant: )
    - config  

When I check configuration via
hassio ha check
I get the following error:

KeyError: ‘packages’
Fatal error while loading config: ‘packages’
Failed config
General Errors:
- ‘packages’
Successful config (partial)

If I have whitelisted folders active

If I remove the whitelist_external_dirs I don’t get any errors but sensor.filetemp never ever appears either way, I’m not sure I need to use whitelist_external_dirs since my text file is in the config folder?

It seems like it should be straightforward but I’m completely stumped with getting this to work??

Looks like I solved it by copying text file into /test subfolder then editing paths to the following:


- platform: file
  name: FileTemp
  file_path: /config/test/sensor.json
  value_template: '{{ value_json.temperature }}'
  unit_of_measurement: '°C'


    - /config/test

In case anyone else has same stumbling block :slight_smile:

Thanks and hello to everyone - I’m new to Home Assistant and just found the forum.