Need help to close roller blinds at 4 p.m. if sunny

I’ve been successful setting up a basic time schedule to close my Motion roller blinds at 4 pm from Sept to May, but would like to only have them close if the cloud coverage is less than 30%. Below is the yaml for this automation, but the blinds will not close when OpenWeather shows anything below 30%. Is there something wrong with the way I have this set up? I’m pretty much a novice and learning as I go, so thanks in advance!

alias: Roller Blinds Close 4 pm Sept thru April
description: ''
trigger:
  - platform: time
    at: '16:00:00'
condition:
  - condition: template
    value_template: >
      {% set n = now() %} {{ n.month == 9 or ( n.month == 4 and ( 1 <= n.day <=
      30 )) }}
  - condition: numeric_state
    entity_id: sensor.openweathermap_cloud_coverage
    above: '0'
    below: '30'
action:
  - device_id: f39be060232c8045f4cc2621a5e258c5
    domain: cover
    entity_id: cover.rollerblind_0001
    type: set_position
    position: 0
  - device_id: 6537fff95c309a677aad8e80f4a19925
    domain: cover
    entity_id: cover.rollerblind_0002
    type: set_position
    position: 0
mode: single

I think the day doesn’t matter and this will only work in april and september

condition:
  - condition: template
    value_template: {{ now().month >= 4 and now().month <= 9 }}

The sun.sun entity also has elevation (angle above/below the horizon) and azimuth (horizontal angle of the sun). You can use those to work out if the sun is likely to be coming directly through the window.

You’ll need to do some experimentation, checking the values (in Developer tools → States) when the sun is and isn’t coming through the window.

alias: Roller Blinds Close 4 pm Sept thru April
description: ''
trigger:
  - platform: time
    at: '16:00:00'
condition:
  - "{{ now().month <= 4 or now().month >= 9 }}"
  - "{{ states('sensor.openweathermap_cloud_coverage') | int <= 30 }}"
action:
  - service: cover.set_cover_position
    target:
      entity_id:
        - cover.rollerblind_0001
        - cover.rollerblind_0002
    data:
      position: 0
mode: single

Thanks @123 that worked perfectly!

Understood, although I live near Seattle WA so the cloud cover is more pertinent than sun position! Thanks for the tip though.