Hi. I have setup an ESP 8266 to read temp and humidity and control a single relay. I was successful with a single relay. I am trying to use Home assistant to code an ESP8266 to control a 2nd relay. The relays are using Pins D4 & D8. I want to know what code should be added to control the second relay.
My code looks like this currently but am getting errors when I try to validate it.
‘’’
sensor:
- platform: dht
pin: D2
temperature:
name: “Living Room Temperature”
humidity:
name: “Living Room Humidity”
update_interval: 5s
switch:
- platform: gpio
name: “Living Room Lights”
pin: D4
switch:
- platform: gpio
name: “Awning Lights”
pin: D8
‘’’
Please could someone assist me with this problem.
Thanks