Cannot find sensors due to yaml code problems

We can’t read those logs or that YAML formatted like that. Please format it properly with the </> button or by surrounding it with three backticks:

```
CODE (YAML, LOGS ETC) GOES HERE
```

You’ll need to re-paste the code, because the forum has converted all of the quotes and spaces. If it doesn’t look like my code blocks below, don’t hit Submit.

I assume your configuration.yaml has a line in that reads:

template: !include templates.yaml

That file should then contain YAML structured like this (one of mine):

- sensor:
    - name: outside_temperature
      unique_id: fd5837fd-6d40-4cd8-81a2-fc84d2411ff5
      unit_of_measurement: "°C"
      device_class: temperature

I think you’re missing the first - sensor: line; but without the properly-formatted code I can’t comment on any other problems as the indentation has been destroyed.

If you’re finding YAML hard, you could always create those sensors in the UI. Helpers / Create Helper / Template / Template a sensor, then:

Don’t use the code from your post above though, as all the quotes are now wrong.

1 Like