12-20-2022, 04:25 PM
Hello,
I'm trying to configure one of the relays on the board as a momentary relay, but I can't get the configuration right.
according to ESPHome the code should be
toggle:
-platform: gpio
pin: 25
id:relay
name: "Gate Remote"
icon: "mdi:gate"
on_turn_on:
- delay: 500ms
- switch.turn_off: relay
I have tried to adapt it to my configuration for relay 1 of the KC868-A8 board.
switch:
- platform: gpio
name: "a8-garaje_rele_1"
pin:
pcf8574: pcf8574_hub_out_1
number: 0
mode: OUTPUT
inverted: true
on_turn_on:
- delay: 500ms
- switch.turn_off: relay
but I can't get rid of the error "on_turn_on" is an invalid option for Pin
Could you help me configure it?
Thanks in advance
I'm trying to configure one of the relays on the board as a momentary relay, but I can't get the configuration right.
according to ESPHome the code should be
toggle:
-platform: gpio
pin: 25
id:relay
name: "Gate Remote"
icon: "mdi:gate"
on_turn_on:
- delay: 500ms
- switch.turn_off: relay
I have tried to adapt it to my configuration for relay 1 of the KC868-A8 board.
switch:
- platform: gpio
name: "a8-garaje_rele_1"
pin:
pcf8574: pcf8574_hub_out_1
number: 0
mode: OUTPUT
inverted: true
on_turn_on:
- delay: 500ms
- switch.turn_off: relay
but I can't get rid of the error "on_turn_on" is an invalid option for Pin
Could you help me configure it?
Thanks in advance