Aquarium dimmer

In ESPhome i have a device for controlling my aquarium light.
For this i use a Wemos D1 mini, with a mosfet to control the 24V power suply.

The led light is dimmed with PWM
see below.

what i aqtualy want is a on/off command that start sunrise and sunset default_transition_length : 1h
and need a way to control the led strip imidiatly. without the transistion time, is there a way to do this ?

output:
  - platform: esp8266_pwm
    pin: D4
    frequency: 1000 Hz
    id: pwm_output
   
light:
  - platform: monochromatic
    output: pwm_output
    name: "Test Light"
    default_transition_length : 1h
    gamma_correct: 0

you can remove the default_transition_length there and leave it at the default 1 second, for the “immediately”

for the automation you then call the light service specifying the transition time:

    - light.turn_on:
        id: light_1
        brightness: 100%
        transition_length: 1h

you need the automation for sunrise and sunset, you can use esphome sun component or create services invoked from ha and use the ha to trigger them