New MQTT form new Homeassistant release, syntax question

I have some mqtt binary sensors defined in binary_sensors.yaml (e.g. split up).
I understand the format has been changed.

Do i go from :

  - unique_id: pantry_security_system_1_disarm
    platform: mqtt
    name: 'Pantry Security System 1 disarm'
    state_topic: 'home/pantry_security_system_1_disarm'
    off_delay: 5
    device_class: motion

To::

mqtt:
   binary_sensor:
       - unique_id: pantry_security_system_1_disarm
       name: 'Pantry Security System 1 disarm'
       state_topic: 'home/pantry_security_system_1_disarm'
       off_delay: 5
       device_class: motion

If so, can i still keep it split up in the binary_sensors.yaml file ?

Thanks,

looks right to me.

No.

mqtt sensors are their own domain now and no longer fall under the binary sensor domain.

you can split them by including an mqtt.yaml file in place of the binary_sensors.yaml file.

1 Like

Great, much obliged!