ESPHome example
esp8266:
board: d1_mini
i2c:
sda: GPIO4
scl: GPIO5
binary_sensor:
- platform: gpio
pin:
number: GPIO13
mode: INPUT_PULLUP
inverted: true
name: "Button"
A full config with sensors, keys and a pin clash check: ESPHome generator. Other boards: ESP32, ESP32-C3, ESP32-S3.
Where to buy
Links open a search in the shop; some are affiliate links: buying through them costs you nothing extra and supports this site. We do not sell devices or get them from manufacturers.