All of my sensors didnt work anymore

Hey all,
after restarting mit Hass.io Pi (0.87) my Sensors didn’t work anymore.
I use sensor: !include_dir_merge_list sensors/ to include a bunch of yaml files
but everytime i test the configuration I get an error. To solve the problem I have deleted this entry and tried
to load only one sensor via the configuration yaml.

I’ve used this:

sensor:
  - platform: yr

But this didnt work too 0o.
This here ist the error message I get:

Invalid config for [sensor]: required key not provided @ data[‘id’]. Got None required key not provided @ data[‘secret’]. Got None required key not provided @ data[‘username’]. Got None. (See /config/configuration.yaml, line 53). Please check the docs at Sensor - Home Assistant

Does anybody have a cllue for me?! I don’t know how to solve this.
Thanks in advance!

Is your secrets file missing?

No, I have a secrets.yaml in my root folder.

Well HA cant find it:

Hmm I dont get It, it is located here:

Imgur

What should I do? Replace it?!

I don’t think the problem is with sensors, but with something around that spot in your config.

Probably a spacing issue.

But it only occours if I activate a sensor in my configuration.yaml and it shows another line number in the error message if I move the sensor configuration inside the file.

so what is your configuration yaml?!

Come on. If you want help, provide info.

This is the content of my configuration.yaml

homeassistant:

  name: Dohlenhorst
  latitude: !secret latitude
  longitude: !secret longitude
  unit_system: metric
  time_zone: Europe/Berlin
  customize: !include etc/customize.yaml

group: !include groups/lichter.yaml
fritzbox: !include components/fritzbox.yaml
weather: !include weather/darksky.yaml
automation: !include_dir_merge_list automations/
script: !include scripts/kodi.yaml
custom_updater: !include etc/custom_updater.yaml
media_player: !include_dir_merge_list media_player/
scene: !include_dir_merge_list scenes/
timer: !include timer/sleeptimer.yaml
cast: !include etc/chromecast.yaml
http: !include etc/http.yaml
device_tracker: !include etc/device_tracker.yaml
notify: !include etc/notify.yaml
#sensor: !include_dir_merge_list sensors/
hue: !include components/hue_bridge.yaml
plant: !include etc/plants.yaml

lovelace:
 mode: yaml

frontend:
  themes: !include themes/themes.yaml


config:
updater:
conversation:
history:
logbook:
map:
hassio:
sun:
ios:

sensor:
  - platform: yr
tts:
  - platform: google
cloud:

Thank you very much for your help.

Can you format your code properly?

Oh okay, I’ve tried my best. Is it readable so?

Yes, that’s better.

So what is the error you get when you ONLY use the yr sensor?

Okay thanks for your help!
When I’m only using the yr sensor I get the following error:

Invalid config for [sensor]: required key not provided @ data[‘id’]. Got None required key not provided @ data[‘secret’]. Got None required key not provided @ data[‘username’]. Got None. (See /config/configuration.yaml, line 44). Please check the docs at Sensor - Home Assistant

seems to me if it was going to crash on secrets, it should crash when it’s called on latitude.

since your sensor isn’t calling a secret, you need to verify your secrets.yaml is correct and formatted properly

Oh no. I’ve found the problem. Inside my custom_components folder was a file called sensor.py.
I placed it in there by accident it should be in one of the subfolders. After I delted the file and restarted the Pi everything works fine. Sorry to bother you. An error in the home-assistant.log hinted me the problem. Thank you very much again. You guys are awesome!