I have put all my devices into entities folder and include that folder from the files inside integrations folder.
One device = one yaml file inside entities folder.
Like that \home-assistant\config\integrations
helpers.yaml
input_boolean: !include ../entities/helpers/input_boolean.yaml
input_number: !include ../entities/helpers/input_number.yaml
input_select: !include ../entities/helpers/input_select.yaml
lights.yaml
light: !include_dir_list ../entities/lights
sensors.yaml
sensor: !include_dir_list ../entities/sensors
binary_sensor: !include_dir_list ../entities/binary_sensors
switches.yaml
switch: !include_dir_list ../entities/switches
then example of one entity is
…/entities/binary_sensors/window-vestibule.yaml
platform: mqtt
name: "window in vestibule"
state_topic: "smarthome/firstFloor/vestibule/window"
icon: mdi:window-closed-variant
payload_on: 1
payload_off: 0
It worked until I update my HA to 2023.9.0.dev20230728.
Now instead of my devices I see error text on lovelace screen and in configuration I see Remove platform: mqtt
But YAML check button still allow to reload HA.
But if I try to just remove platform: mqtt then I got error Invalid config for [binary_sensor]: required key not provided @ data[‘platform’]. Got None. (See ?, line ?). and with this error YAML check doesn’t allow to reload HA.
If I try to change like that then anyway I see errors
\home-assistant\config\integrations\mqtt.yaml
mqtt:
binary_sensor: !include_dir_list ../entities/binary_sensors
…/entities/binary_sensors/window-vestibule.yaml
name: "window in vestibule"
state_topic: "smarthome/firstFloor/vestibule/window"
icon: mdi:window-closed-variant
payload_on: 1
payload_off: 0
what is the problem?