wernerhp/esphome.centurion_d5_evo

Gate gets triggered when ESP restarts and relays draw power while inactive

Opened this issue · 0 comments

Hi, I'm not too sure how to make contributions to github projects, but I'm hoping the below might help someone:

By default, ESPHome seems to let the ESP power relays by default, this makes the relay toggle when the ESP turns on or off. This wastes power by keeping the relays powered the whole time as they are only turned off momentarily when a trigger is needed (instead of the other way around).

By adding the line inverted: true in the below areas was the solution for me, it saves power and doesn't cause the get to get triggered when the ESP restarts, if you already have the setup working, it will require rewiring 4 of the wires on your relay between NO and NC:

output:
  - platform: gpio
    pin: ${relay_1_pin}
    id: relay_1
    inverted: true

  - platform: gpio
    pin: ${relay_2_pin}
    id: relay_2
    inverted: true

  - platform: gpio
    pin: ${relay_3_pin}
    id: relay_3
    inverted: true
switch:
  - platform: gpio
    pin:
      number: ${relay_4_pin}
    id: relay_4
    icon: "mdi:lock"
    name: "Lock"
    inverted: true