I’m having a problem with this code, I’m unsure, but I think it’s the esp32 ports. Can anybody help me ?
binary_sensor:
- platform: gpio
pin:
number: GPIO2
inverted: true
mode:
input: true
pullup: true
id: display_button
on_press:
then:
- display.page.show_next: oled
- component.update: oled
- platform: gpio
id: button1
pin:
number: GPIO4
mode: INPUT_PULLUP
inverted: true
on_press:
then:
- output.turn_on: led1
- output.turn_off: led2
- output.turn_off: led3
- output.turn_off: led4
- output.turn_off: led5
- platform: gpio
id: button2
pin:
number: GPIO5
mode: INPUT_PULLUP
inverted: true
on_press:
then:
- output.turn_off: led1
- output.turn_on: led2
- output.turn_off: led3
- output.turn_off: led4
- output.turn_off: led5
- platform: gpio
id: button3
pin:
number: GPIO12
mode: INPUT_PULLUP
inverted: true
on_press:
then:
- output.turn_off: led1
- output.turn_off: led2
- output.turn_on: led3
- output.turn_off: led4
- output.turn_off: led5
- platform: gpio
id: button4
pin:
number: GPIO14
mode: INPUT_PULLUP
inverted: true
on_press:
then:
- output.turn_off: led1
- output.turn_off: led2
- output.turn_off: led3
- output.turn_on: led4
- output.turn_off: led5
- platform: gpio
id: button5
pin:
number: GPIO15
mode: INPUT_PULLUP
inverted: true
on_press:
then:
- output.turn_off: led1
- output.turn_off: led2
- output.turn_off: led3
- output.turn_off: led4
- output.turn_on: led5
light:
- platform: binary
name: "LED1"
output: led1
- platform: binary
name: "LED2"
output: led2
- platform: binary
name: "LED3"
output: led3
- platform: binary
name: "LED4"
output: led4
- platform: binary
name: "LED5"
output: led5
output:
- id: led1
platform: gpio
pin: GPIO32
- id: led2
platform: gpio
pin: GPIO33
- id: led3
platform: gpio
pin: GPIO27
- id: led4
platform: gpio
pin: GPIO18
- id: led5
platform: gpio
pin: GPIO19