I am making a thermostat and one of the issues I have with the pi is that on restart it sets all its pins to input which will provide power to devices, in this case a relay being used to switch on and off my various devices.
Because it seems like none of the pins are guaranteed to be low during the boot phase (though apparently you can set this on shutdown), I can't just leave my relays connected to it since they get activated. I am aware of dtoverlay=gpio-poweroff,gpiopin=some_pin. This does not work because it is not true the whole time during bootup.
I am considering just building a xor gate using two of the gpio pins so that its off at boot up, off at shutdown, and on when I set it to be so in software. It feels a bit silly that theres no way of managing this. I hope I am wrong!