I installed the yaml and then the buttons/contacts would not work. So i did an on_press trigger to correct it. I got everything to work together and remember state, but I am having an issue. when the unit reboots I have to push every button/contact 2 times to get it to switch then it works fine afterwords as it should. I tried to do an if/then command on the on_press line. Can you help me with this issue. Am I trying to get the buttons and contacts to work the wrong way? Also when I go to change a switch via tuya or home assistant they are not in sync until the relay has been triggered twice as well. thanks for you help.

