esphome-ratgdo/base.yaml

178 lines
4.4 KiB
YAML
Raw Normal View History

2023-06-09 14:20:53 -05:00
---
2023-06-08 12:48:16 -05:00
2023-06-07 18:26:40 -05:00
external_components:
- source:
type: git
2023-06-09 11:00:55 -05:00
url: https://github.com/esphome-ratgdo/esphome-ratgdo
2023-06-11 08:33:21 -07:00
ref: dev
2023-06-07 18:26:40 -05:00
refresh: 1s
ratgdo:
id: ${id_prefix}
2023-06-09 16:07:51 -05:00
uart:
tx_pin:
2023-06-13 11:30:38 -10:00
number: ${uart_tx_pin} # red control terminal / GarageDoorOpener (UART1 TX) pin is D4 on D1 Mini
2023-06-09 16:07:51 -05:00
inverted: true
rx_pin:
2023-06-13 11:30:38 -10:00
number: ${uart_rx_pin} # red control terminal / GarageDoorOpener (UART1 RX) pin is D2 on D1 Mini
2023-06-09 16:07:51 -05:00
inverted: true
baud_rate: 9600
2023-06-09 15:41:36 -05:00
2023-06-09 17:36:56 -05:00
sensor:
- platform: ratgdo
id: ${id_prefix}_openings
type: openings
entity_category: diagnostic
ratgdo_id: ${id_prefix}
2023-06-09 17:58:46 -05:00
name: "Openings"
2023-06-09 17:36:56 -05:00
unit_of_measurement: "openings"
2023-06-09 17:53:27 -05:00
icon: mdi:open-in-app
2023-06-09 17:36:56 -05:00
2023-06-09 15:41:36 -05:00
switch:
2023-06-09 15:54:20 -05:00
- platform: ratgdo
id: ${id_prefix}_lock_remotes
type: lock
entity_category: config
ratgdo_id: ${id_prefix}
2023-06-09 17:58:46 -05:00
name: "Lock remotes"
2023-06-09 15:41:36 -05:00
- platform: gpio
id: "${id_prefix}_status_door"
2023-06-09 17:45:15 -05:00
internal: true
2023-06-09 15:41:36 -05:00
pin:
2023-06-13 11:30:38 -10:00
number: ${status_door_pin} # D0 output door status, HIGH for open, LOW for closed
2023-06-09 15:41:36 -05:00
mode:
output: true
2023-06-09 17:58:46 -05:00
name: "Status door"
2023-06-09 15:41:36 -05:00
entity_category: diagnostic
- platform: gpio
id: "${id_prefix}_status_obstruction"
2023-06-09 17:45:15 -05:00
internal: true
2023-06-09 15:41:36 -05:00
pin:
2023-06-13 11:30:38 -10:00
number: ${status_obstruction_pin} # D8 output for obstruction status, HIGH for obstructed, LOW for clear
2023-06-09 15:41:36 -05:00
mode:
output: true
2023-06-09 17:58:46 -05:00
name: "Status obstruction"
2023-06-09 15:41:36 -05:00
entity_category: diagnostic
2023-06-07 18:26:40 -05:00
binary_sensor:
- platform: ratgdo
type: motion
id: ${id_prefix}_motion
ratgdo_id: ${id_prefix}
2023-06-09 17:58:46 -05:00
name: "Motion"
2023-06-07 18:26:40 -05:00
device_class: motion
- platform: ratgdo
type: obstruction
id: ${id_prefix}_obstruction
ratgdo_id: ${id_prefix}
2023-06-09 17:58:46 -05:00
name: "Obstruction"
2023-06-07 18:26:40 -05:00
device_class: problem
2023-06-09 15:41:36 -05:00
on_press:
- switch.turn_on: ${id_prefix}_status_obstruction
on_release:
- switch.turn_off: ${id_prefix}_status_obstruction
2023-06-09 18:05:06 -05:00
- platform: ratgdo
type: button
id: ${id_prefix}_button
ratgdo_id: ${id_prefix}
name: "Button"
entity_category: diagnostic
2023-06-07 21:40:07 -05:00
- platform: ratgdo
type: motor
id: ${id_prefix}_motor
ratgdo_id: ${id_prefix}
2023-06-09 17:58:46 -05:00
name: "Motor"
2023-06-07 21:40:07 -05:00
device_class: running
2023-06-08 06:54:05 -05:00
entity_category: diagnostic
2023-06-09 11:08:16 -05:00
- platform: gpio
2023-06-09 14:38:21 -05:00
id: "${id_prefix}_dry_contact_open"
2023-06-09 14:28:41 -05:00
pin:
2023-06-13 11:30:38 -10:00
number: ${dry_contact_open_pin} # D5 dry contact for opening door
2023-06-09 14:28:41 -05:00
inverted: true
mode:
input: true
pullup: true
2023-06-09 17:58:46 -05:00
name: "Dry contact open"
2023-06-09 14:13:40 -05:00
entity_category: diagnostic
2023-06-09 12:33:18 -05:00
on_press:
2023-06-09 14:38:21 -05:00
- if:
condition:
binary_sensor.is_off: ${id_prefix}_dry_contact_close
then:
2023-06-09 17:56:47 -05:00
- cover.open: ${id_prefix}_garage_door
2023-06-09 12:33:18 -05:00
- platform: gpio
2023-06-09 14:38:21 -05:00
id: "${id_prefix}_dry_contact_close"
2023-06-09 14:28:41 -05:00
pin:
2023-06-13 11:30:38 -10:00
number: ${dry_contact_close_pin} # D6 dry contact for closing door
2023-06-09 14:28:41 -05:00
inverted: true
mode:
input: true
pullup: true
2023-06-09 17:58:46 -05:00
name: "Dry contact close"
2023-06-09 14:13:40 -05:00
entity_category: diagnostic
2023-06-09 12:33:18 -05:00
on_press:
2023-06-09 14:38:21 -05:00
- if:
condition:
binary_sensor.is_off: ${id_prefix}_dry_contact_open
then:
2023-06-09 17:56:47 -05:00
- cover.close: ${id_prefix}_garage_door
2023-06-09 12:33:18 -05:00
- platform: gpio
2023-06-09 14:38:21 -05:00
id: "${id_prefix}_dry_contact_light"
2023-06-09 14:28:41 -05:00
pin:
2023-06-13 11:30:38 -10:00
number: ${dry_contact_light_pin} # D3 dry contact for triggering light (no discrete light commands, so toggle only)
2023-06-09 14:28:41 -05:00
inverted: true
mode:
input: true
pullup: true
2023-06-09 17:58:46 -05:00
name: "Dry contact light"
2023-06-09 14:13:40 -05:00
entity_category: diagnostic
2023-06-09 12:33:18 -05:00
on_press:
2023-06-09 14:23:18 -05:00
- light.toggle: ${id_prefix}_light
2023-06-07 18:26:40 -05:00
number:
- platform: ratgdo
id: ${id_prefix}_rolling_code_counter
type: rolling_code_counter
entity_category: config
ratgdo_id: ${id_prefix}
2023-06-09 17:58:46 -05:00
name: "Rolling code counter"
2023-06-07 18:34:24 -05:00
mode: box
unit_of_measurement: "codes"
2023-06-07 18:26:40 -05:00
cover:
- platform: ratgdo
2023-06-09 17:56:17 -05:00
id: ${id_prefix}_garage_door
2023-06-07 18:26:40 -05:00
device_class: garage
2023-06-09 17:58:46 -05:00
name: "Door"
2023-06-07 18:26:40 -05:00
ratgdo_id: ${id_prefix}
2023-06-09 15:43:13 -05:00
on_closed:
2023-06-09 15:41:36 -05:00
- switch.turn_off: ${id_prefix}_status_door
2023-06-09 15:42:01 -05:00
on_open:
2023-06-09 15:41:36 -05:00
- switch.turn_on: ${id_prefix}_status_door
2023-06-07 18:26:40 -05:00
light:
- platform: ratgdo
2023-06-09 14:23:41 -05:00
id: ${id_prefix}_light
2023-06-09 17:58:46 -05:00
name: "Light"
2023-06-07 18:26:40 -05:00
ratgdo_id: ${id_prefix}
button:
- platform: restart
2023-06-09 17:58:46 -05:00
name: "Restart"
2023-06-08 11:50:39 -05:00
- platform: safe_mode
2023-06-09 17:58:46 -05:00
name: "Safe mode boot"
2023-06-08 11:50:39 -05:00
entity_category: diagnostic
2023-06-07 18:45:37 -05:00
- platform: ratgdo
id: ${id_prefix}_sync
type: sync
entity_category: diagnostic
ratgdo_id: ${id_prefix}
2023-06-09 17:58:46 -05:00
name: "Sync"
2023-06-07 18:59:49 -05:00
- platform: ratgdo
id: ${id_prefix}_query
type: query
entity_category: diagnostic
ratgdo_id: ${id_prefix}
2023-06-09 17:58:46 -05:00
name: "Query"