Automation dont start after time

Hi,
I have an automation what i want to starts after a state of sun and after a time.
But it doesnt trigger after the time.
Here is my example.
What is wrong at it?

- alias: 'test'
  trigger:
    platform: numeric_state
    entity_id: sun.sun
    value_template: '{{ state.attributes.elevation }}'
    below: -1.0
  condition: 
    condition: and
    conditions: 
      - condition: state
        entity_id: group.tracker_lw
        state: 'home'     
      - condition: time
        after: '18:00'         
  action:
    - service: light.turn_on
      data: 
        entity_id: light.kleine_lamp
        brightness: 10

If i restart this automation after the selected time (18:00) then it works.
If i start before that time it doesnt start at 1800

If I read it correctly your automation does the following:

When the sun goes below the horizon and the tracker_lw group is home and it’s after 18:00h then the light turns on.
If the sun goes below the horizon when tracker_lw or after 18:00h nothing happens.

Is that what you intended?

Not sure what you mean by ‘If i restart this automation after the selected time’ - the trigger is the value of the elevation going below -1.0.
Only at the point in time that value changes to less than -1.0 the conditions are checked.

Yes that is what i want!

But i thought that he checks the automation until all conditions are good to launch?
So if sunset before 1800 nothing happends, after it is 1800he will launch

It will only check the conditions at the moment the trigger value becomes true, which is only once.

ok then i have to find another solution to make!

You are using a trigger based on the sunset but it’s actually a condition for what you want to achieve. There are several ways do solve this; You should add sunset to the conditions and use a time trigger which will check every xx seconds or minutes if the conditions are true (I think this is what you expected to happen).

trigger:
  platform: time
  minutes: '/1'

But you can also use multiple automations for example one based on arriving home with sun and time as a condition, one based on sunset with being home and time as a condition and one based on time with being home and sunset as a condition.