4 channel Relay ESP8266 Wifi board WORKING with esphome

Thanks for the help but I ended with a bit of a nicer solution. You can use a switch template to have this uart thing act like a real single switch in HomeAssistant:

  - platform: template
    name: "Relay2"
    id: "Relay2"
    optimistic: true
    turn_on_action:
      - uart.write: [0xA0, 0x02, 0x01, 0xA3] # turn on Relay2
    turn_off_action:
      - uart.write: [0xA0, 0x02, 0x00, 0xA2]
4 Likes