Automation only to happen when the sun is down, but it doesn't work?

I’ve made an automation to close the blind in the bedroom, but only if the window is closed.
To supplement that, I made this small automation to close the blind if the window is closed, and if I add the sunset / sunrise conditions, nothing happens.

- id: '1570991270753'
  alias: Blind - close if window is closed, and the sun is already down
  description: ''
  trigger:
  - entity_id: binary_sensor.vindue_sovevaerelse
    for: 0:00:15
    from: 'on'
    platform: state
    to: 'off'
  condition:
  - after: sunset
    before: sunrise
    condition: sun
  action:
  - data:
      entity_id: cover.rullegardin_i_sovevaerelse
    service: cover.close_cover

If I change the condition to check for below_horizon then it works, but then I can’t make use the offset.

- id: '1570991270753'
  alias: Blind - close if window is closed, and the sun is already down
  description: ''
  trigger:
  - entity_id: binary_sensor.vindue_sovevaerelse
    for: 0:00:15
    from: 'on'
    platform: state
    to: 'off'
  condition:
  - condition: state
    entity_id: sun.sun
    state: below_horizon
  action:
  - data:
      entity_id: cover.rullegardin_i_sovevaerelse
    service: cover.close_cover

Shouldn’t I be able to use the sunset / sunrise as conditions this way?

The documentation shows an example using both after: sunset and before: sunrise. However, it doesn’t combine them into a single condition but as two separate conditions with a logical OR.

condition:
  condition: or  # 'when dark' condition: either after sunset or before sunrise - equivalent to a state condition on `sun.sun` of `below_horizon`
  conditions:
    - condition: sun
      after: sunset
    - condition: sun
      before: sunrise

Hi @123
So two problems.

When I was still at uni (100 years ago :-D), we had boolean math, so with that knowledge, the logic doesn’t add up. Well it depends on how HA defines the day and sunrise/sundown.
If you only consider the sunrise / sundown within a day it can be an OR, otherwise it must be an AND.
In some parts of the world (nothern/southern) the sun doesn’t set/rise within 24 hours (midsommer/midwinter), so with that in mind, you are always before a sunrise OR after a sunset?

So what does HA do?

And the GUI allows one to mark both settings in one statement, that is clearly a fault then.