Trying to use illuminance integration


Im new into ha and such and have not many devices yet. The question i have now is how i always have my light on at the right time based on the weather.
Sometimes as u know , especially in summer , it can be still light late in the Evening , but when its cloudy it can get dark sooner. How do i manage this in the best possible way? Iv tried the custom integration :

But actually have no idea how to use it properly.
I manage to get the integration visible as entity (sensor) , but dont know how to add the values and its unclear for me what i need to add tot the yaml configuration. I copy pasted the example but when i use the automation the light turns on right after saving the automation.

This is my automation config :

description: ""
  - platform: state
      - sensor.home_outdoor_illuminance
  - condition: state
    entity_id: weather.buienradar
    state: cloudy
  - condition: time
    after: "08:00:00"
  - service: light.turn_on
      color_temp: 500
      brightness_pct: 40
      device_id: xxxxxxx light 
mode: single

It is not turning on while it is dark enough to turn on some light
Did i do this correctly?

Ok its running now but i still dont think i did it correctly.
Can someone confirm?