I’m trying to organize my files but for some reason the include directory isn’t working for sensors.
I’ve already done this with automations, and it works great:
!include_dir_merge_named automations_yaml
Now I want to do it for sensors.
If I try and import sensor files using a directory, this doesn’t work (but passes checks no errors):
!include_dir_merge_named sensors_yaml
But if I maually specify exactly one file, it works perfectly
!include sensors_yaml/rtl433_mqtt_acurite_tower_sensors.yaml
What is going on here?
Here’s the contents of the file sensors_yaml/rtl433_mqtt_acurite_tower_sensors.yaml:
# Outside Front Sensor
- platform: mqtt
name: "Outside Front Temperature"
state_topic: "homeassistant/sensor/rtl433/Acurite_tower_sensor/14084"
unit_of_measurement: '°C'
value_template: "{{ value_json.temperature_C }}"
- platform: mqtt
name: "Outside Front Humidity"
state_topic: "homeassistant/sensor/rtl433/Acurite_tower_sensor/14084"
unit_of_measurement: '%'
value_template: "{{ value_json.humidity }}"
# Outside Rear Sensor
- platform: mqtt
name: "Outside Rear Temperature"
state_topic: "homeassistant/sensor/rtl433/Acurite_tower_sensor/9972"
unit_of_measurement: '°C'
value_template: "{{ value_json.temperature_C }}"
- platform: mqtt
name: "Outside Rear Humidity"
state_topic: "homeassistant/sensor/rtl433/Acurite_tower_sensor/9972"
unit_of_measurement: '%'
value_template: "{{ value_json.humidity }}"