Having troubles automating the inovelli blue dimmer switch in our kitchen

I fairly new to HA but I have all of my other lights and zones working without any issues. We have 4 canned lights in our kitchen that aren’t smart lights that are connected to our Inovelli dimmer switch, VZM31-SN. The automation is trigger off of a Aqara FP2 presence sensor and I have it set to turn them on at 25% when presence is detected and to turn off when there isn’t. The automation will turn the lights on but it won’t turn them off. What am I missing? Here is the YAML

alias: Kitchen Lights Turn On

description: “”

triggers:

  • trigger: state

entity_id:

  • binary_sensor.aqara_fp2_presence_sensor_2

to: “on”

id: “On”

from: null

  • trigger: state

entity_id:

  • binary_sensor.aqara_fp2_presence_sensor_2

to: “off”

id: “Off”

from: “on”

conditions:

  • condition: time

after: “16:00:00”

before: “22:00:00”

weekday:

  • sat

  • fri

  • thu

  • wed

  • tue

  • mon

  • sun

enabled: true

actions:

  • if:

  • condition: trigger

id:

  • “On”

then:

  • action: light.turn_on

metadata: {}

data:

brightness_pct: 25

target:

device_id: 0853e382b442d01923b071fdc42182ee

  • if:

  • condition: trigger

id:

  • “Off”

then:

  • action: switch.turn_off

metadata: {}

data: {}

target:

device_id: 0853e382b442d01923b071fdc42182ee

mode: single

I had someone on reddit with the answer. Even though turning them on at 25% with the switch.turn_on command the turn off needed to be light.turn_off.