Moving binary_sensor entries to files not working

In my HA configuration.yaml file, I have the following entries:

binary_sensor:
  - platform: trend
    sensors:
      masterbath_humidity_rising:
        entity_id: sensor.masterbath_humidity
        sample_duration: 600
        max_samples: 20
        min_gradient: 0.05
        device_class: moisture

  - platform: trend
    sensors:
      masterbath_humidity_stable_up:
        entity_id: sensor.masterbath_humidity
        sample_duration: 600
        max_samples: 100
        min_gradient: 0.00833333333
        invert: true

  - platform: trend
    sensors:
      masterbath_humidity_stable_down:
        entity_id: sensor.masterbath_humidity
        sample_duration: 600
        max_samples: 100
        min_gradient: -0.00833333333
        invert: true

I want to move them to their own file, so I deleted them and at the top of the file I put the following setting:

binary_sensor: !include_dir_merge_list ./sensor/binary/

and then I created a file in ./sensor/binary/ called humidity_trends.yaml and put the following lines in that file:

- platform: trend
  sensors:
    masterbath_humidity_rising:
      entity_id: sensor.masterbath_humidity
      sample_duration: 600
      max_samples: 20
      min_gradient: 0.05
      device_class: moisture

- platform: trend
  sensors:
    masterbath_humidity_stable_up:
      entity_id: sensor.masterbath_humidity
      sample_duration: 600
      max_samples: 100
      min_gradient: 0.00833333333
      invert: true

- platform: trend
  sensors:
    masterbath_humidity_stable_down:
      entity_id: sensor.masterbath_humidity
      sample_duration: 600
      max_samples: 100
      min_gradient: -0.00833333333
      invert: true

HA “check configuration” shows no problems. Restart HA and now my automations where I use those sensors I get error “Error in describing trigger: Cannot read properties of undefined entity id”

Generally, how does one move

binary_sensor:

to files?

Use packages.