hi,
I’d like to make things cleaner so I’ve tried to move my “sensor data” from my configuration.yaml file to a file in a subdirectory config/sensor>sensor.yaml
in my configuration.yaml it was :
sensor:
- platform: template
sensors:
weather_temperature:
friendly_name: "Temperature Exterieure"
unit_of_measurement: 'degrees'
value_template: "{{ state_attr('weather.home', 'temperature') }}"
`
then i remove that and i add :
sensor: !include_dir_merge_named sensor/
in my sensor.yaml file, i put :
- platform: template
sensors:
weather_temperature:
friendly_name: "Temperature Exterieure"
unit_of_measurement: 'degrees'
value_template: "{{ state_attr('weather.home', 'temperature') }}"
when i check my config ==> configuration valid !
but in the UI i get a message : entity not available
remark : i've done the same cleaning for input_number , input_select ... and for them it works perfectly.
why it doesn't work for sensor ?
many thanks for your help
yes i put sensor.yaml in the directoty /config/sensor
and "sensor: !include_dir_merge_named sensor/" in my configuration.yaml : it doesn't work
when i put sensor.yaml in /config
and "sensor: !include sensor.yaml "in my configuration.yaml : it works
I’m trying to do this as well and now all of my sensors are unavailable. I wanted to organize my sensors as the list is expanding.
In my config, I have the following: sensor: !include_dir_merge_list sensor/
then I have the following structure config/sensor/default_sensors.yaml with all of my sensors. I have updated to Supervisor 220 and Home Assistant 0.109.2 recently.
I have checked my configuration and it says valid but I don’t think Home Assistant is seeing my sensor yaml anymore. I tried changing it back to the way I had it before and still no dice.