Dimming & brightening lights when toggling film mode

Apologies, I’m quite new to HA!

What I’m trying to do is dim my sitting room lights when I toggle film mode on (an input boolean I have created), and then brighten them back up to the pre-film mode brightness levels when I toggle film mode back off - with my current attempt being to store that level in an input number. This is my YAML below - what am I doing wrong? It’s neither dimming nor brightening the lights when I toggle film mode. Many thanks!

alias: Sitting Room Lights Film Mode
description: Change the brightness of the Sitting Room Lights when toggling Film Mode
trigger:
  - platform: state
    entity_id:
      - input_boolean.film_mode
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: input_boolean.film_mode
            state: "on"
        sequence:
          - service: input_number.set_value
            target:
              entity_id: input_number.sitting_room_lights_brightness
            data:
              value: light.sitting_room_1.brightness
            enabled: true
          - device_id: e1b6ab5c7171a5cfecd1546c648d0
            domain: light
            entity_id: e17b2e36b3ba814ab128c3744e303
            type: brightness_decrease
          - repeat:
              sequence: []
              until:
                - condition: state
                  entity_id: light.sitting_room_1
                  attribute: brightness
                  state: "20"
          - device_id: 2ddc657a8fbb7303af2d97ad4c9b0
            domain: light
            entity_id: 561d25a56266f786595b826a62b17
            type: brightness_decrease
          - repeat:
              sequence: []
              until:
                - condition: state
                  entity_id: light.sitting_room_2
                  attribute: brightness
                  state: "20"
          - device_id: 11a98de045438b6865039b760d0e6
            domain: light
            entity_id: b7b3b03460bf28d2a8e6ff9c315d8
            type: brightness_decrease
          - repeat:
              sequence: []
              until:
                - condition: state
                  entity_id: light.sitting_room_3
                  attribute: brightness
                  state: "20"
      - conditions:
          - condition: state
            entity_id: input_boolean.film_mode
            state: "off"
        sequence:
          - device_id: e1b6ab5c7171a5cfecd1546c648d0
            domain: light
            entity_id: e17b2e36b3ba814ab128c3744e303
            type: brightness_increase
          - repeat:
              sequence: []
              until:
                - condition: state
                  entity_id: light.sitting_room_1
                  attribute: brightness
                  state: input_number.sitting_room_lights_brightness
          - device_id: 2ddc657a8fbb7303af2d97ad4c9b0
            domain: light
            entity_id: 561d25a56266f786595b826a62b17
            type: brightness_increase
          - repeat:
              sequence: []
              until:
                - condition: state
                  entity_id: light.sitting_room_2
                  attribute: brightness
                  state: input_number.sitting_room_lights_brightness
          - device_id: 11a98de045438b6865039b760d0e6
            domain: light
            entity_id: b7b3b03460bf28d2a8e6ff9c315d8
            type: brightness_increase
          - repeat:
              sequence: []
              until:
                - condition: state
                  entity_id: light.sitting_room_3
                  attribute: brightness
                  state: input_number.sitting_room_lights_brightness
mode: single

What does the trace of the automation say?
(this will answer your why)

Also as a side - because you’re new thers also a few things you may want to look at while learning…

research scenes. Not only can you set a number of entity states at once by firing one scene. There’s also a transient snapshot function where you can capture current state of a set of entities.

So the automation is on trigger, snapshot current. Apply desired scene.
On disable apply snapshot (to revert)

Also I know it doesn’t seem very intuitive now. - avoid device settings in your automation and use entity states instead. Devices are unique to a given device and disappear when a device os replaced requiring an automation edit. Referring to an item by its entity however allows the entity to be replaced without automation edit as long as your new device has the same entity name… (will save a lot of time and headache later if you start that now)