WLED check if last preset is selected in automation

Hi,

my simple automation for a single-button WLED control looks like this:

  • If off: switch on and use first preset
  • If on:
    If last preset selected: switch off
    Else: use next preset

I did it via UI and it works. However, the “if last preset selected” part uses a hardcoded option:

condition: device
device_id: b36704bf68e3e7ec35ed1db8da73a37d
domain: select
entity_id: acb2f5d0c1631cf002361c17f3d5ff71
type: selected_option
option: Twinklefox1

Can someone point me at a better approach for evaluating it the last WLED preset is selected?