ESP8266 Fried on Binary Sensor High

Thanks for the suggestion. If the black side of the button now goes to +3.3v and D5 goes to a resistor then GND, where would the green line from the button go?

The green line will stay where it is (D5). Another connection from the same place (D5) will be a resistor to GND

Thanks for explaining. Re the code, do I remove the internal pull up and the inverted bit since I think what you are describing is an external pull down?

Yes. It’s exactly like that.

This makes about as much sense to me as telling a stranger in town to turn left at Fred’s house.

Please draw a schematic. Pencil and paper is fine, even preferred over a picture because a schematic removes all possible ambiguity.

No.

10K resistor is OK for 99.9% of the applications you will encounter. In fact anything between 1K and 100K would also probably work. The idea of a pullup or pulldown resistor is to make sure the GPIO pin is always at a known level regardless if the switch/button is open or closed.

Most of the time the internal pullup is sufficient and you don’t need any resistors on your switch circuit. This is what most of us use most of the time. This is the equivalent of the internal pullup:

internal pullup

Pepe59 was describing the gpio and resistor to GND which in your images is shown as a pull down but you’ve said I wasn’t correct when I called it that. I’m I missing something?

No. Text and pictures are not a good substitute for a schematic. And reading his description again, I am not clear that he wired it as a pulldown.

You are probably confusing internal and external.
If I write a resistor to GND from D5, it will be clear to everyone that this is not an internal setting, but an external resistor connected to GND. And that is the pulldown connection. If I connect the resistor to VCC, the external connection will be pullup. Nowhere did I write about internal linking using yaml code