What am I doing wrong: Invalid data for call_service at pos 1: extra keys not allowed @ data['brightness_pct']

Why does this produce an error?

Edit: I just realised, is it when the trigger is light.turn_off?

Logger: homeassistant.components.automation.automatic_motion_based_lights_allrum
Source: helpers/script.py:1344
Integration: Automation (documentation, issues)
First occurred: 09:43:41 (1 occurrences)
Last logged: 09:43:41

Allrum - Motion lights: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data[‘brightness_pct’]

alias: ' Allrum - Motion lights'
description: ''
trigger:
  - platform: state
    entity_id: binary_sensor.sensor_allrummet_motion
    to: 'on'
  - platform: state
    entity_id: binary_sensor.sensor_allrummet_motion
    to: 'off'
    for: '0:5:00'
condition:
  - condition: time
    after: '07:00'
    before: '19:00'
  - condition: not
    conditions:
      - condition: state
        entity_id: binary_sensor.pc_activity
        state: 'on'
action:
  - service_template: light.turn_{{trigger.to_state.state}}
    data_template:
      entity_id: light.allrum
      brightness_pct: 75
      transition: 5
  - condition: state
    entity_id: light.barnens_rum
    state: 'off'
  - condition: state
    entity_id: light.sovrum
    state: 'on'
    for: '00:15:00'
  - service: light.turn_off
    data: {}
    entity_id: light.sovrum
mode: restart