Skip to content

Instantly share code, notes, and snippets.

@DelusionalAI
Last active November 10, 2023 10:27
Show Gist options
  • Save DelusionalAI/c3bfa05b5268a96f8a0c527ceace5f1b to your computer and use it in GitHub Desktop.
Save DelusionalAI/c3bfa05b5268a96f8a0c527ceace5f1b to your computer and use it in GitHub Desktop.
ESPHome Fallback config example.
output:
- platform: gpio
pin: GPIO4
id: shelly_25_relay_1
- platform: gpio
pin: GPIO15
id: shelly_25_relay_2
fan:
- platform: binary
name: "${channel_1}"
output: shelly_25_relay_1
id: fanid1
light:
- platform: binary
name: "${channel_2}"
output: shelly_25_relay_2
id: lightid1
binary_sensor:
- platform: gpio
pin:
number: GPIO13
name: "${channel_1} input"
on_press:
if:
condition:
api.connected:
then: # Nothing, we let Node-Red Handle it.
else:
- fan.turn_on: fanid1
on_release:
if:
condition:
api.connected:
then: # Nothing, we let Node-Red Handle it.
else:
- fan.turn_off: fanid1
######DO NOT REMOVE STOPS OVERHEATING ###
### https://www.savjee.be/2020/11/shelly25-esphome-potential-fire-hazard-fix/ ###
- platform: gpio
pin: GPIO16
name: "ade7953 IRQ pin"
internal: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment