Template sensor : sensor entity not available

Actually, the problem came from my inclusion :

sensor: !include sensors.yaml

It was set in ui-lovelace.yaml. It has to be in configuration.yaml.
with the followingconfiguration.yaml, it works fine :

homeassistant:
  customize: !include customize.yaml
default_config:
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
switch: !include switches.yaml
light: !include lights.yaml
sensor: !include sensors.yaml
lovelace:
  mode: yaml

Thank you very much for your help!

Why om earth did you set it in ui-lovelace.yaml? How did you get that idea? Did someone tell you to do it like this or did you read it somewhere?

You’re welcome … but I think you may need to review this chapter of the documentation:

For future reference, marking your own post as the Solution is reserved for the situation where you independently discovered the solution.

1 Like