How to manually publish state

I want to wake up wifi and then publish state, and then disable wifi. below is the code, Is the line of code “- delay: 10s” necessary? Will the wifi component automatically wait for the publish command to be executed before enter deep sleep command?

  enable_on_boot: false
      - lambda: |-
      - delay: 10s
      - deep_sleep.enter: xxxx

  - wifi.enable:

You might get more responses if you publish whole yaml redacting your passwords and encryption codes. More info sparks more interest. Explain what you are trying to do. :+1:

1 Like

You may want to look at the “api connected” triggers/conditions (assuming you are using the api).