Advertisement
xangin

KS604s ESPhome

Nov 18th, 2022
1,241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.93 KB | None | 0 0
  1. binary_sensor:
  2.   - platform: gpio
  3.     pin:
  4.       number: GPIO3
  5.       mode: INPUT_PULLUP
  6.     id: top_button
  7.     on_press:
  8.       - switch.toggle: top_relay
  9.       - switch.toggle: top_led
  10.  
  11.   - platform: gpio
  12.     pin:
  13.       number: GPIO5
  14.       mode: INPUT_PULLUP
  15.     id: bottom_button
  16.     on_press:
  17.       - switch.toggle: bottom_relay
  18.       - switch.toggle: bottom_led
  19.  
  20. switch:
  21.   - platform: gpio
  22.     id: top_led
  23.     name: "Top LED"
  24.     pin:
  25.       number: GPIO4
  26.       inverted: True
  27.  
  28.   - platform: gpio
  29.     id: bottom_led
  30.     name: "Bottom LED"
  31.     pin:
  32.       number: GPIO14
  33.       inverted: True      
  34.      
  35.    
  36.   - platform: gpio
  37.     name: "Top Relay"
  38.     pin: GPIO13
  39.     id: top_relay
  40.  
  41.   - platform: gpio
  42.     name: "Bottom Relay"
  43.     pin: GPIO12
  44.     id: bottom_relay
  45.  
  46.   - platform: gpio
  47.     name: "USB Relay"
  48.     pin: GPIO15
  49.     id: usb_relay
  50.  
  51. status_led:
  52.   pin:
  53.     number: GPIO0
  54.     inverted: True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement