Hi have the following code which creates a button to open my garage door (this works). I have now added the sensor using a pressure sensor connected to pin 2.
I am wanting to display the status of the sensor on my dashboard but cannot find it when I am editting the card
Here is my code
esphome:
name: garage-door
esp8266:
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: !secret ota_password-garage_door
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Garage-Door Fallback Hotspot"
password: !secret fallback_password-garage_door
captive_portal:
switch:
- platform: gpio
name: "Garage Door"
id: relay
pin: 5
inverted: true
icon: "mdi:garage"
on_turn_on:
- delay: 150ms
- switch.turn_off: relay
# https://esphome.io/components/binary_sensor/gpio.html
binary_sensor:
- platform: gpio
pin:
number: 2
mode: INPUT_PULLUP
inverted: True
name: "Garage Door State"
filters:
- delayed_on : 10ms
I have tried testing the sensor but can’t seem to get it to sense anything when I connect pin 2 to ground.