02-17-2025, 01:50 AM
Hi all.
I have a small problem. I want to program in ESP Home. Then is IO1 pressed by button, switch relay DO01 to on status.
For example switch on/off light, after short signal from button.
I try programed this code, but function not working. Can you help me? I don't know if the addressing is preserved Number 0 to DO1
binary_sensor:
- platform: gpio
name: A32 Pro DI01
pin:
xl9535: xl9535_hub_in1
number: 0
mode: INPUT
inverted: true
on_press:
then:
- switch.toggle: Switch01
- platform: gpio
name: A32 Pro Switch01
id: Switch01
pin:
xl9535: xl9535_hub_out1
number: 0
mode: OUTPUT
inverted: true
I have a small problem. I want to program in ESP Home. Then is IO1 pressed by button, switch relay DO01 to on status.
For example switch on/off light, after short signal from button.
I try programed this code, but function not working. Can you help me? I don't know if the addressing is preserved Number 0 to DO1
binary_sensor:
- platform: gpio
name: A32 Pro DI01
pin:
xl9535: xl9535_hub_in1
number: 0
mode: INPUT
inverted: true
on_press:
then:
- switch.toggle: Switch01
- platform: gpio
name: A32 Pro Switch01
id: Switch01
pin:
xl9535: xl9535_hub_out1
number: 0
mode: OUTPUT
inverted: true