Simple configuration light on/off not working

Guys

I m new and trying a few days to put a configuration for my outside light to go switch on and off on time.
When test the config all work but the action has neven been triggered.

need light on 45 min after sunset and light off at 02:00 hour
This was one of my config:
alias: Light on/off
description: “”
trigger:

  • platform: time
    at: “21:00:00”
    condition:
  • condition: sun
    after: sunset
    action:
  • type: turn_off
    device_id: f1401706ce46a9aa62540b6f01d0ee0e
    entity_id: light.voordeur_verlichting_light
    domain: light
    mode: single

I think you need something like this

description: ""
mode: single
trigger:
  - platform: sun
    event: sunset
    offset: "-00:45:00"
    id: Light on
  - platform: time
    at: "02:00:00"
    id: "Light off "
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: Light on
        sequence:
          - type: turn_on
            device_id: 1750b9e31b2a4cdebd783a664cea5c94
            entity_id: light.hall_table_light_level_on_off
            domain: light
            brightness_pct: 100
      - conditions:
          - condition: trigger
            id: "Light off "
        sequence:
          - type: turn_off
            device_id: 1750b9e31b2a4cdebd783a664cea5c94
            entity_id: light.hall_table_light_level_on_off
            domain: light


You’ll need to put your own light in

alias: example 
trigger:
  - id: 'on'
    platform: sun
    event: sunset
    offset: '-00:45:00'
  - id: 'off'
    platform: time
    at: '02:00:00'
condition: []
action:
  - service: 'light.turn_{{ trigger.id }}'
     target:
       entity_id: light.voordeur_verlichting_light

Thanks a lot for the help

I ve a time issue.

On mu ubuntu server my local time is right configurated but the home assistant trigger the action 2 hours earlier. Checked time on HA and it is also right configurated.