Skip to content

Instantly share code, notes, and snippets.

@tathamoddie
Last active October 10, 2022 16:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tathamoddie/8d5b5f36c4bac597caa6ca3435370449 to your computer and use it in GitHub Desktop.
Save tathamoddie/8d5b5f36c4bac597caa6ca3435370449 to your computer and use it in GitHub Desktop.
- alias: Notify when gate buzzing
trigger:
- entity_id: binary_sensor.gate_buzzer
from: 'off'
platform: state
to: 'on'
condition: []
action:
- service: notify.everyone
data:
message: 👋 Somebody is at the gate
data:
tag: gate_buzz
channel: Gate Buzz
importance: high
actions:
- action: open_gate
title: Open Gate
- alias: Actionable notification - Open Gate
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: open_gate
action:
- service: switch.turn_on
data:
entity_id: switch.gate_latch
- service: notify.everyone
data:
message: 🔓 Gate opened
data:
tag: gate_open
channel: Gate Open
importance: high
timeout: 10
esphome:
name: intercom
platform: ESP8266
board: esp01_1m
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
power_save_mode: none
logger:
level: verbose
api:
password: !secret esphome_secret
ota:
password: !secret esphome_secret
sensor:
- platform: uptime
name: Intercom Uptime
- platform: wifi_signal
name: Intercom Signal
switch:
- platform: gpio
pin: GPIO0
id: relay
name: Gate Latch
inverted: true
icon: "mdi:gate"
on_turn_on:
- delay: 10s
- switch.turn_off: relay
binary_sensor:
- platform: gpio
pin: GPIO2
name: "Gate Buzzer"
filters:
- invert:
- delayed_off: 250ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment