Putting binary sensors in different file?

So i wanted to setup my 433 sensors as binary sensors but add them to a different file, e.g. not in configuration.

I followed the format of the other included file, but i get a message saying “433_sensors integration not found”. Not sure what i’m doing wrong here.

I just added:

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
light: !include lights.yaml

433_sensors: !433_sensors.yaml

and added the 433_sensors.yaml as a separate file.

binary_sensor:
  - platform: mqtt
    name: "Study Room Pir"
    state_topic: "tele/tasmota_5AF452/RESULT"
    value_template: '{{ value_json.RfReceived.Data}}'
    payload_on: "07242C"
    payload_off: "off"
    device_class: Motion
    qos: 1
    off_delay: "10"

should this not work ? i read through the guide on splitting up files, maybe i’m missing something here (i’m sure).

Many thanks for any pointers/help.

regards

Try:

binary_sensor: !include 433_sensors.yaml

Then in 433_sensors.yaml:

  - platform: mqtt
    name: "Study Room Pir"
    state_topic: "tele/tasmota_5AF452/RESULT"
    value_template: '{{ value_json.RfReceived.Data}}'
    payload_on: "07242C"
    payload_off: "off"
    device_class: Motion
    qos: 1
    off_delay: "10"

  - platform: etc etc

Without binary_sensor at the top.

!include just slots in the content of 433_sensors.yaml, so you’ve already got binary_sensor once.

This video have a section that explains the different type of includes you can make.

Thanks all, will try this.