ESP32 triggers unwanted signal on startup when confirguring external input switch

I am trying to set up external pushbutton connected to an esp32 to trigger a node red flow in home assistant. I have the entity configured in esp as a binary sensor and visible in both HA and node red. The button does trigger the flow as required however when the ESP is powered on and off the sequence is triggered unintentionally. There seems to be voltage on the GPIO at boot. Have tried using pullup config on the GPIO as well as a physical Pull up resistor and several different GPIO, but nothjing seems to stop the voltage at start up. I would have thought this is a fairly smple input into the ESP32. Any help would be greatly appreciated

Which input are you using. There is a table lower down on this page of the best ones to use:

I know nothing about node red flows, but if they are triggered like automations make sure you are triggering on the state transition ‘from off to on’. Not just ‘to on’. Otherwise you will trigger the flow when the state goes from unknown (esp offline) to on.

To follow up with Tom, use an event state node and at the bottom check all that apply.

1 Like

I currently have it connected to GPIO13, but have tried, 5, 36, 19 and 1. Have tried input pull-up and pull down on various Gpios as well as physical resistors connected. So not sure really.
I have an event state node configure as Mikefila has mentioned below

I’ll try some of those other options in the event state node as I currently only have it set as you have it shown.
Thanks for your help

I set it to the following and it seems to work. I guess this is a software workaround.
Thanks for your help
Danny
image

what is this menu? where does it turn on?

Its part of Node Red, an App that runs on Home Assistant to run automations. The menu is part of the Event State Node within Node Red