I have an LED connected to the esp8266 , now the issue is when I add a button on my dashboard and lets say the current state on the ESP and the dashboard both was “on”.
I unplug the esp8266 from the power and then I switch the state of the button to “off” , whenever esp8266 fires up again it follows its last state that the LED is on but now when I try to control it from the button it is working in reverse . Like instead of checking whether the button state is on or off in my dashboard it feels like as it is simply switching the state of the LED.
How do I make the ESP check the state of the button on the dashboard and only follow that. Like if the button is of irrespective of the last State the LED goes off and if the button is on the LED also goes on