Use standard components for our ecosystem
This commit is contained in:
+34
-37
@@ -10,6 +10,10 @@ substitutions:
|
||||
dry_contact_close_pin: GPIO14
|
||||
dry_contact_light_pin: GPIO27
|
||||
|
||||
web_server:
|
||||
include_internal: true
|
||||
local: true
|
||||
|
||||
esphome:
|
||||
name: garage-gate
|
||||
friendly_name: ${friendly_name}
|
||||
@@ -30,6 +34,15 @@ external_components:
|
||||
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:
|
||||
@@ -40,39 +53,33 @@ ratgdo:
|
||||
input_gdo_pin: ${uart_rx_pin}
|
||||
output_gdo_pin: ${uart_tx_pin}
|
||||
input_obst_pin: ${input_obst_pin}
|
||||
on_sync_failed:
|
||||
then:
|
||||
- homeassistant.service:
|
||||
service: persistent_notification.create
|
||||
data:
|
||||
title: "${friendly_name} sync failed"
|
||||
message: "Failed to communicate with garage opener on startup."
|
||||
notification_id: "esphome_ratgdo_${id_prefix}_sync_failed"
|
||||
#on_sync_failed:
|
||||
# then:
|
||||
# - homeassistant.service:
|
||||
# service: persistent_notification.create
|
||||
# data:
|
||||
# title: "${friendly_name} sync failed"
|
||||
# message: "Failed to communicate with garage opener on startup."
|
||||
# notification_id: "esphome_ratgdo_${id_prefix}_sync_failed"
|
||||
|
||||
api:
|
||||
id: api_server
|
||||
services:
|
||||
- service: wipe_devices_from_gdo_memory
|
||||
variables:
|
||||
devices_to_wipe: string
|
||||
then:
|
||||
- lambda: !lambda |-
|
||||
id($id_prefix).clear_paired_devices(devices_to_wipe);
|
||||
#api:
|
||||
# id: api_server
|
||||
# services:
|
||||
# - service: wipe_devices_from_gdo_memory
|
||||
# variables:
|
||||
# devices_to_wipe: string
|
||||
# then:
|
||||
# - lambda: !lambda |-
|
||||
# id($id_prefix).clear_paired_devices(devices_to_wipe);
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
id: ${id_prefix}_ratgdo_ota
|
||||
- platform: web_server
|
||||
id: ${id_prefix}_ratgdo_ota_ws
|
||||
|
||||
web_server:
|
||||
include_internal: true
|
||||
local: true
|
||||
|
||||
# Sync time with Home Assistant.
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: homeassistant_time
|
||||
- platform: sntp
|
||||
id: sntp_time
|
||||
servers: !secret sntp_servers
|
||||
timezone: Europe/Zurich
|
||||
|
||||
improv_serial:
|
||||
@@ -87,14 +94,10 @@ wifi:
|
||||
captive_portal:
|
||||
|
||||
logger:
|
||||
baud_rate: 115200
|
||||
logs:
|
||||
sensor: NONE
|
||||
|
||||
text_sensor:
|
||||
- platform: version
|
||||
id: ${id_prefix}_firmware_version
|
||||
name: "Firmware Version"
|
||||
|
||||
binary_sensor:
|
||||
- platform: ratgdo
|
||||
type: motion
|
||||
@@ -192,9 +195,6 @@ sensor:
|
||||
entity_category: diagnostic
|
||||
name: "Paired Devices"
|
||||
icon: mdi:remote
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signal"
|
||||
update_interval: 120s
|
||||
- platform: ratgdo
|
||||
id: ${id_prefix}_vehicle_distance_actual
|
||||
type: distance
|
||||
@@ -346,9 +346,6 @@ light:
|
||||
name: "Light"
|
||||
|
||||
button:
|
||||
- platform: restart
|
||||
id: ${id_prefix}_restart
|
||||
name: "Restart"
|
||||
- platform: safe_mode
|
||||
id: ${id_prefix}_safe_mode
|
||||
name: "Safe mode boot"
|
||||
|
||||
Reference in New Issue
Block a user