Broken Automation - Switch on change

Hi
This used to work fine however since an update it has stopped for some reason.

The switch used cannot be changed as is link to harmony remote via smartthinsg. Should be toggling from 30 to 100 and then back.

It use to have something in the ‘to’ section but cannot remember what, sure its something simple.

alias: 2 - Lighting- Ambient 100%
description: ""
trigger:
  - platform: state
    entity_id:
      - switch.living_room_st_virtual
action:
  - service: light.turn_on
    target:
      entity_id:
        - light.hue_go
        - light.hue_play_left
        - light.hue_play_right
        - light.hue_play_centre
    data:
      brightness_pct: "{{ 30 if trigger.to_state.state == 'off' else 100 }}"
mode: single