Automation for the alarm clock

Good morning,

I created an automation for the alarm clock my problem is that I want certain lights to turn on in the name of sunrise,
the problem I encounter with the automation created is that even if the sun is up the lights still come on I can’t understand where I went wrong,
I have tried several methods but nothing works, please help me,

alias: Reveil  Guy
description: ""
trigger:
  - platform: calendar
    event: start
    offset: "-1:0:0"
    entity_id: calendar.travail
condition:
  - condition: time
    before: "10:00:00"
action:
  - if:
      - condition: sun
        before: sunrise
    then:
      - service: scene.turn_on
        metadata: {}
        target:
          entity_id: scene.guy
      - service: light.turn_on
        metadata: {}
        data: {}
        target:
          entity_id: light.bar
  - service: media_player.volume_set
    data:
      volume_level: 0.25
    target:
      entity_id:
        - media_player.enceinte_chambre
        - media_player.enceinte_cuisine
        - media_player.enceinte_salle_de_bain
  - device_id: f1e0cc101544ca3b90f57ed632aa3cd4
    domain: cover
    entity_id: 444a1ca51b7c7bf827f41a63cf09ff37
    type: open
  - device_id: ea5d96aaa6389e39a24222e7d811e35f
    domain: cover
    entity_id: 3c570eec0a18c81af8cad50bcdc981e7
    type: open
  - device_id: 246da48946640635cf82e6500892d335
    domain: cover
    entity_id: 149d9db4d3bb14d74b6a9ca5251b25ae
    type: open
  - device_id: cf08142d1529a39237552dcc950d4ccf
    domain: cover
    entity_id: 5baa989f0830a40b5e298de0dd2075be
    type: open
  - delay:
      hours: 0
      minutes: 6
      seconds: 0
      milliseconds: 0
  - service: light.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: light.bar
  - if:
      - condition: sun
        before: sunrise
    then:
      - service: scene.turn_on
        metadata: {}
        target:
          entity_id: scene.repas
mode: single