ESP8266 GPIO0 (or GPIO2) - problem with state on startup

Hi,
I’m trying to make simple watering solution - I’m using ESP8266 and 6 relay board - that is why I need 6 output pins to control relays. I’m using GPIO5, GPIO4, GPIO14, GPIO12, GPIO13 and I need one more (so per my understanding the only good options are GPIO0 or GPIO2)
Problem is that I need those have +3V on startup. I was able to solve that with other GPIO using simple configuration:

esp8266:
  early_pin_init:false

and each GPIO I’m using is having configuration:

inverted: True
restore_mode: ALWAYS_OFF

But it does not work with GPIO0 or GPIO2 → those for short period of time during boot are pulled to ground (and after my config is triggered and those are getting +3V)

Is there anything I can do to solve that problem ? Or the only option is to use GPIO splitter ?

Have you tried GPIO01 (Tx pin)?

Yes,
Maybe it’s because I’m powering it via USB but I’m getting constant state changes on that pin

  - platform: gpio
    pin: 1
    id: lora_switch
    restore_mode: ALWAYS_OFF
    name: "lora"
    inverted: true
    on_turn_on:
    - delay: 50ms
    - switch.turn_off: lora 

Worked in my esp12F but I was powering it from 3.3V pin.

Turn off serial on Logger
baud_rate: 0

At that point Esp32 devboard would be good option…

Still did not work
Thanks for the suggestion - I’ll purchase ESP32 and I will have more GPIO which I can use as output pins (+ maybe I’ll be able to add few buttons ?)

Why not?
I recommend the oldest board, Wroom32.

The only true safe pins for relays are: gpio4 and gpio5.

do not play
Where is the fun in only playing safe? :wink: