How do you use timeout: with wait_until:?

How do you use timeout: with wait_until: ?
I’ve tried many scenarios, and searched only with now luck.
This works for wai_until: without a timeout:

esphome:
  name: huzzahwin9b
  on_boot:
    priority: 600     #  Defaults to 600 DOESN'T WAIT FOR WIFI    
    then:
      - wait_until:
          wifi.connected:  #  timeout:    HOW TO USE IT?
      - lambda: 'id(displaytext).publish_state("wifi on");'     
      - wait_until:  
          api.connected:     #   REMEMBER THAT  LOGGER  COUNTS AS AN API CLIENT  
      - lambda: 'id(displaytext2).publish_state("api on");'     

Clearly it’s in the documentation (link below), but as usual there are no examples.
Automations and Templates — ESPHome

WELL I figured out how to use timeout: with wait_until: on my own:

      - wait_until:              # WORKS
          condition: 
            wifi.connected: 
          timeout: 8s          # TIMEOUT WORKS
      - if:
          condition:
            wifi.connected:
          then:
            - lambda: 'id(displaytext).publish_state("wifi on");'     
          else:
            - lambda: 'id(displaytext).publish_state("wifi TO");'  
1 Like