Deep Sleep not behaving

Hi Guys!

Im trying to setup deep sleep to enter deep sleep on boot if the sun is below horizon and then to exit deep sleep at a certain time of the day/night.

Right now, it wont sleep nor wake? Any ideas what im doing wrong?

Thanks

esphome:
  name: rf-transmitter
  friendly_name: rf-transmitter

  on_boot:
    priority: 200
    then:
      - logger.log: Waiting for API connection...
      - wait_until:
          condition:
            api.connected:
          timeout: 10s
      - logger.log: Waiting for time...
      - wait_until:
          condition:
            time.has_time:
          timeout: 10s
      - if:
          condition:
            - sun.is_below_horizon:
          then:
            - deep_sleep.enter:
                id: deep_sleep_1
                until: "00:10:00"
                time_id: ha_time

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:

captive_portal:
    
time:
  - platform: homeassistant
    id: ha_time

sun:
 # your location
  latitude: -36.848461
  longitude: 174.763336

deep_sleep:
  id: deep_sleep_1