Esp32 need GPIO pin high when running and low/0 when in deep sleep

I am trying to make a weather station and using an esp32 and esphome. I have the esp32 wake for 30 seconds read the sensors and connect to the network and then go to sleep for 5 minutes. When the esp32 goes to sleep I want to diable power to the sensors to save power. I got a load switch to do it. It works but I can’t seem to get a GPIO pin to behave the way I want.

What I want to happen:
When the esp32 is running the GPIO pin needs to be HIGH
When the esp32 is in deep sleep GPIO pin LOW/0 (It must be really 0 as the load switch uses almost no power and sees a floating pin as high. )

Some code I have by trying different options with…

switch:
  - platform: gpio
    pin: 
      number: GPIO27
      mode: OUTPUT_OPEN_DRAIN
    id: "fake"
    restore_mode: ALWAYS_ON
    #inverted: True

Can anyone help me get this right? :slight_smile:

Thanks!