Can't get Automation to ub _Help please

I got the original program from the Share your projects and modified it but it won’t load. I’ve run the Screen portion and the enable and disable parts they all seem ok. In the main part I took out the logic about if some lights were already on. I’ve tried changing the number of spaces in the “condition;” all with no luck. I’ve gone thru the spelling carefully, nothing as work.

  • alias: First Morning Motion
    trigger:
    platform: state
    entity_id: binary_sensor.mstrbd_sinksensor
    to: ‘on’

    condition:
    condition: state
    entity_id: input_boolean.trigger_first_morning
    state: ‘on’

    action:

    • service: homeassistant.turn_off
      entity_id: input_boolean.trigger_first_morning

    • service: scene.turn_on
      entity_id: scene.morning_first_motion

I just noticed that the spacing here doesn’t match the file.

  • alias: First Morning Motion
    trigger:
    platform: state
    entity_id: binary_sensor.mstrbd_sinksensor
    to: ‘on’

    condition:
    condition: state
    entity_id: input_boolean.trigger_first_morning
    state: ‘on’

    action:

    • service: homeassistant.turn_off
      entity_id: input_boolean.trigger_first_morning

    • service: scene.turn_on
      entity_id: scene.morning_first_motion

I’ve just replaced all of the spaces, but this still doesn’t match my yaml file.

Please read the blue banner at the top of the page and edit your post accordingly.

Thanks for the tip
Title should have read “Can’t get Automation to run”. It doesn’t ‘compile’ not sure if that’s the right description. It doesn’t show up it the entities list. Again I’ve tried with and without the dash in the condition state line and with 2 spaces and 4 spaces. Again Thanks ,

  - alias: First Morning Motion
    trigger:
      platform: state
      entity_id: binary_sensor.mstrbd_sinksensor
      to: 'on'

    condition:
      - condition: state
        entity_id: input_boolean.trigger_first_morning
        state: 'on'

    action:
      - service: homeassistant.turn_off
        entity_id: input_boolean.trigger_first_morning

      - service: scene.turn_on
        entity_id: scene.morning_first_motion

Is this in an !include file or directly under the automation: section in your configuration.yaml file?

It’s in Automations_old dir

The only thing I can see is that you should have single quotes around the alias.

  - alias: 'First Morning Motion'

What error(s) do you get when you do a configuration check?

OK before and after the quotes it reads ’ Configuration valid!" I tied a eload automations . It didn’t help. so I’m doing a restart

OK restart complete, still didn’t load. I want to thank you for your help.

What does your configuration.yaml automation: !include… section look like?

Includes:

alert: !include_dir_merge_list alerts
automation: !include automations.yaml
automation old: !include_dir_merge_list automations_old
#binary_sensor: !include dir_merge_list binary_sensors
camera: !include_dir_merge_list cameras
climate: !include_dir_merge_list climate
counter: !include counters.yaml
#counter: !include_dir_merge_list counters
cover: !include_dir_merge_list covers
#custom_componet: !include_dir_merge_list custom_componets
#customize: !include_dir_merge_named customizations
device_tracker: !include_dir_merge_list device_tracker
fan: !include_dir_merge_named fans
group: !include groups.yaml
#group: !include_dir_merge_named group
##Format validated
#####input_boolean: !include_dir_merge_named input_booleans
#input_boolean: !include dir_merge_list input_booleans
#input_boolean: !include_dir_named input_booleans
input_boolean: !include input_booleans.yaml
input_number: !include_dir_merge_named input_numbers
input_select: !include_dir_merge_list input_select
light: !include_dir_merge_list lights
#media_player: !include_dir_merge_list media_players
#mqtt: !include_dir_merge_list mqtt
notify: !include_dir_merge_named notifications
#notify: !include_dir_merge_list notifications
#python_scripts: #!include_dir_named python_scripts
#packages: !include_dir_named packages
proximity: !include_dir_named proximities
scene: !include_dir_merge_list scenes
#script: !include scripts.yaml
script: !include_dir_merge_named scripts
sensor: !include_dir_merge_list sensors ##Format validated
shell_command: !include_dir_merge_named shell_command
###Format validated
switch: !include_dir_merge_list switches
###Format validated
#theme: !include_dir_merge_list themes
zone: !include zones.yaml

This was a good question I see that I have binary sensors commented out. I had forgotten that I commented them out to get it to run ealier… There was something wrong in the line, I replaced it with a cut and paste from the example section from the web and now it runs.

New entery “binary_sensor: !include_dir_merge_list binary_sensors” which to me looks just like the fist but now it works. I also changed the line " [entity_id: binary_sensor.mstrbd_sinksensor" to “entity_id:
- binary_sensor.mstrbd_sinksensor” but that didn’t help so I’ve changed it back.