Automation broke after an update...problem with conditions?

This automation stopped working for me, I think it was when I went from 43.2 to 45.1 but I’m not certain it wasn’t an earlier update. I removed the conditions and it does trigger so I suspect it’s either a change in the formatting allowed or a problem with the way time and/or sunrise/sunset are implemented. Any insights?

- alias: Kitchen Motion Light
  trigger:
    platform: state
    entity_id: binary_sensor.kitchen_motion
    to: 'on'
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: switch.kitchen_motion_switch
        state: 'on'
      - condition: or
        conditions:
        - condition: sun
          after: sunset
          after_offset: "-0:45:00"
        - condition: sun
          before: sunrise
          before_offset: "1:00:00"
  action:
    service: homeassistant.turn_on
    entity_id: script.timed_light_k