Files
esphome/garage-gate.yaml
T

192 lines
4.0 KiB
YAML

web_server:
include_internal: true
local: true
esphome:
name: garage-gate
friendly_name: "Garage Gate"
min_version: 2026.2.0
project:
name: ratgdo.v32disco_secplus2
version: "32disco"
esp32:
board: esp32dev
framework:
type: arduino
external_components:
- source:
type: local
path: components
components: [ ratgdo ]
packages:
wifi: !include templates/wifi.yaml
mqtt: !include templates/mqtt.yaml
ota: !include templates/ota.yaml
uptime: !include templates/uptime.yaml
restart: !include templates/restart.yaml
syslog: !include templates/syslog.yaml
time: !include templates/time.yaml
safe_mode:
preferences:
flash_write_interval: 1min
ratgdo:
id: garage_gate
input_gdo_pin: GPIO21
output_gdo_pin: GPIO17
time:
- platform: sntp
id: sntp_time
servers: !secret sntp_servers
timezone: Europe/Zurich
sensor:
- platform: ratgdo
id: garage_gate_openings
type: openings
entity_category: diagnostic
name: "Openings"
unit_of_measurement: "openings"
icon: mdi:open-in-app
- platform: ratgdo
id: garage_gate_vehicle_distance_actual
type: distance
name: "Vehicle distance actual"
unit_of_measurement: "mm"
internal: true
filters:
- throttle: 1ms
- heartbeat: 1ms
- platform: adc
pin: GPIO34
name: "Voltage"
attenuation: auto
update_interval: 60s
filters:
- calibrate_linear:
- 1.16 -> 5
- 2.783 -> 12
lock:
- platform: ratgdo
id: garage_gate_lock_remotes
name: "Lock remotes"
switch:
- platform: gpio
id: "garage_gate_status_door"
internal: true
pin:
number: GPIO26
mode:
output: true
name: "Status door"
entity_category: diagnostic
- platform: ratgdo
id: garage_gate_led
type: led
pin: GPIO2
name: "LED"
entity_category: config
- platform: ratgdo
id: garage_gate_laser
type: led
pin: GPIO23
name: "LASER"
entity_category: config
number:
- platform: ratgdo
id: garage_gate_rolling_code_counter
type: rolling_code_counter
entity_category: config
name: "Rolling code counter"
mode: box
unit_of_measurement: "codes"
- platform: ratgdo
id: garage_gate_opening_duration
type: opening_duration
entity_category: config
name: "Opening duration"
unit_of_measurement: "s"
- platform: ratgdo
id: garage_gate_closing_duration
type: closing_duration
entity_category: config
name: "Closing duration"
unit_of_measurement: "s"
- platform: ratgdo
id: garage_gate_client_id
type: client_id
entity_category: config
name: "Client ID"
mode: box
cover:
- platform: ratgdo
id: garage_gate_garage_door
device_class: garage
name: "Door"
on_closed:
- switch.turn_off: garage_gate_status_door
on_opened:
- switch.turn_on: garage_gate_status_door
light:
- platform: ratgdo
id: garage_gate_light
name: "Light"
button:
- platform: template
id: garage_gate_query_status
entity_category: diagnostic
name: "Query status"
on_press:
then:
lambda: !lambda |-
id(garage_gate).query_status();
- platform: template
id: garage_gate_query_openings
name: "Query openings"
entity_category: diagnostic
on_press:
then:
lambda: !lambda |-
id(garage_gate).query_openings();
- platform: template
id: garage_gate_sync
name: "Sync"
entity_category: diagnostic
on_press:
then:
lambda: !lambda |-
id(garage_gate).sync();
- platform: template
id: garage_gate_toggle_door
name: "Toggle door"
on_press:
then:
lambda: !lambda |-
id(garage_gate).door_toggle();
output:
- platform: ledc
pin: GPIO33
id: garage_gate_ledc
- platform: ratgdo
id: garage_gate_beeper
type: beeper
rtttl: garage_gate_rtttl
song: "alert:d=8,o=5,b=120:a,p,a,p,a,p,4b,p"
rtttl:
- id: garage_gate_rtttl
output: garage_gate_ledc