Hi, first post and very new to ESPHome and HA. Been considering trying to get to grips with HA for a while, but the need has accelerated by the Blynk server/app shutting at the end of the year and having several devices controlled by it.
They’re all D1 Minis or NodeMCUs connected to relays and/or reed switches and I want to carry on using the same hardware. I’m starting with the garage, it has 2 doors (just toggled rather than separate open and close) and i want to replicate the functionality of being able to open and close on the phone and using the reed switches to display their open/closed state. Also to send me a notification if I forget to close one.
I’ve managed to get the first step done, I’ve got a card on the dashboard that will operate the door and show its status as open or closed (just simulated on a breadboard with an LED and grounding the sensor pin) but I can’t for the life of me work out how to add the second one. I’ve looked at a lot of partial examples I’ve found online but everyone seems to use different methods and every time I try and adapt the code to add a second one I end up with errors, I’ve found how fussy it is with the indentation too and have spent time moving stuff around as errors move about the code.
Anyway this is what I’ve got so far and I’d be grateful for any help getting past this hurdle.
esphome:
name: esphome-web-0be404
esp8266:
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
# Set this to the IP of the ESP
static_ip: 192.168.5.200
# Set this to the IP address of the router. Often ends with .1
gateway: 192.168.5.1
# The subnet of the network. 255.255.255.0 works for most home networks.
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esphome-Web-0Be404"
password: "SgowVPsCVOSa"
captive_portal:
output:
- platform: gpio
id: "door1"
pin: D8
light:
- platform: binary
output: "door1"
name: "Door 1"
binary_sensor:
- platform: status
name: "door1status"
- platform: gpio
pin:
number: D4
inverted: False
name: "door"
device_class: door