Skip to content

Instantly share code, notes, and snippets.

@CountParadox
Created September 18, 2023 04:27
Show Gist options
  • Save CountParadox/75ca31a7fc06587bd1c99bbe41c930ae to your computer and use it in GitHub Desktop.
Save CountParadox/75ca31a7fc06587bd1c99bbe41c930ae to your computer and use it in GitHub Desktop.
binary_sensor:
- platform: gpio
id: pullswitch
pin:
number: 32
mode: INPUT_PULLUP
- platform: template
id: switch_actuated
internal: true
lambda: 'return id(pullswitch).state;'
on_state:
- button.press: relay
button:
- platform: output
id: relay
duration: 200ms
output: output1
output:
- platform: gpio
pin: 26
id: output1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment