Tying Multiple Input Booleans into Automation with Conditional Subtasks?

I’ve set some input booleans that I toggle on and off for various seasonal services we run in the house, for example an outdoor fountain, an automower, Christmas lights, and school year. I’m now trying to figure out how to make our “good night” automation do certain functions based on whether these are enabled.

This is what I use now:

alias: Good night
description: Fires at bedtime
trigger:
  - at: '23:00'
    platform: time
condition: []
action:
  - scene: scene.overnight
  - data:
      entity_id: media_player.master_bath
      message: Good Night
    service: tts.google_translate_say
  - service: switch.turn_off
    data: {}
    entity_id: switch.basement_lights
  - service: switch.turn_off
    data: {}
    entity_id: switch.kitchen_top_lights
  - service: switch.turn_off
    data: {}
    entity_id: switch.kitchen_island_lights
  - type: turn_off
    device_id: 80d0f7eeaac54c6eab6c49fc9da0b7c8
    entity_id: switch.jasco_products_12720_outdoor_smart_switch_switch
    domain: switch
  - condition: state
    entity_id: input_boolean.enable_christmas
    state: 'on'
  - scene: scene.indoor_christmas_off
mode: single

It works fine for a single boolean (Christmas) but I can’t figure out if there is a way to mix them. For example I want to tie the outdoor smart switch into whether the enable_fountain boolean is enabled, and will likely add others, but my understanding is that when a condition is found false, it stops the entire automation, not just a sub-task. So if I did this:

alias: Good night
description: Fires at bedtime
trigger:
  - at: '23:00'
    platform: time
condition: []
action:
  - scene: scene.overnight
  - data:
      entity_id: media_player.master_bath
      message: Good Night
    service: tts.google_translate_say
  - service: switch.turn_off
    data: {}
    entity_id: switch.basement_lights
  - service: switch.turn_off
    data: {}
    entity_id: switch.kitchen_top_lights
  - service: switch.turn_off
    data: {}
    entity_id: switch.kitchen_island_lights
 - condition: state
    entity_id: input_boolean.enable_fountain
    state: 'on'
  - type: turn_off
    device_id: 80d0f7eeaac54c6eab6c49fc9da0b7c8
    entity_id: switch.jasco_products_12720_outdoor_smart_switch_switch
    domain: switch
  - condition: state
    entity_id: input_boolean.enable_christmas
    state: 'on'
  - scene: scene.indoor_christmas_off
mode: single

…then the Christmas part would never work if the Fountain was disabled for the winter season.

Is there any way for conditional subtasks to be used without stopping the entire automation?

Instead of using condition in between the actions, you can use the action type choose which will allow you to continue your script without exiting. I hope you are familiar with choose type action or if you need help do ask.

That helped!

alias: Good night
description: Fires at bedtime
trigger:
  - at: '23:00'
    platform: time
condition: []
action:
  - scene: scene.overnight
  - data:
      entity_id: media_player.master_bath
      message: Good Night
    service: tts.google_translate_say
  - service: switch.turn_off
    data: {}
    entity_id: switch.basement_lights
  - service: switch.turn_off
    data: {}
    entity_id: switch.kitchen_top_lights
  - service: switch.turn_off
    data: {}
    entity_id: switch.kitchen_island_lights
  - choose:
      - conditions:
          - condition: state
            entity_id: input_boolean.enable_christmas
            state: 'on'
        sequence:
          - scene: scene.indoor_christmas_off
    default: []
  - choose:
      - conditions:
          - condition: state
            entity_id: input_boolean.enable_fountain
            state: 'on'
        sequence:
          - type: turn_off
            device_id: 80d0f7eeaac54c6eab6c49fc9da0b7c8
            entity_id: switch.jasco_products_12720_outdoor_smart_switch_switch
            domain: switch
    default: []
mode: single