captive_portal: web_server: port: 80 version: 3 # Add a template component alongside your GPIO pin binary_sensor: - platform: gpio pin: number: GPIO5 # Explicitly using GPIO5 instead of the 'D1' alias mode: INPUT_PULLUP inverted: true id: shorted internal: true text_sensor: - platform: template name: "Tank Full Status" lambda: |- if (id(shorted).state) { return {"True"}; } else { return {"False"}; } # Status LED Configuration (Blinks every 5 seconds to show it's alive) output: - platform: gpio pin: number: GPIO2 # LED_BUILTIN (active low) inverted: true id: builtin_led interval: - interval: 5s then: - output.turn_on: builtin_led - delay: 25ms - output.turn_off: builtin_led