Another config thread

I want my hallway light to come on when I open my front door and it is after sunset but not after sunrise.
I have used the web based Automatons GUI to set this up but it does not work.

Here a screen shot of my Automation https://imgur.com/a/kdLTy

Here is the resulting output in the automations.yaml:

- action:
  - data:
      entity_id: light.h2
    service: light.turn_on
  alias: Hallway night on
  condition:
  - after: sunrise
    before: sunset
    before_offset: -00:30:00
    condition: sun
  id: '1518114375111'
  trigger:
  - entity_id: binary_sensor.door_window_sensor_158d0001b74939
    from: 'off'
    platform: state
    to: 'on'

The light is called h2 and the door open/close sensor is called binary_sensor.door_window_sensor_158d0001b74939

Can anyone help?

Maybe try with above and below horizon.