Blueprint automation computations based on input

Designing a blueprint for automation with a configuration variable e.g.

        brightness_day:
            selector:
                number:
                    min: 1
                    max: 255
                    mode: slider
        brightness_night:
            selector:
                number:
                    min: 1
                    max: 255
                    mode: slider

Now I want to use, in one of the action sequences e.g.

- service: light.turn_on
            data:
              brightness: "{{ (states(brightness_day) * 3 / 4 + states(brightness_night) * 1 / 4) | int }}"
            target:
              entity_id: !input target_light

But this doesn’t work. How do I fix this?