removing irrelevant dry contact config

This commit is contained in:
Paul Wieland 2024-04-15 11:55:45 -04:00
parent 587845820a
commit 6f5b825ca7
1 changed files with 54 additions and 110 deletions

View File

@ -13,70 +13,55 @@ preferences:
ratgdo: ratgdo:
id: ${id_prefix} id: ${id_prefix}
input_gdo_pin: ${uart_rx_pin}
output_gdo_pin: ${uart_tx_pin} output_gdo_pin: ${uart_tx_pin}
input_obst_pin: ${input_obst_pin} input_obst_pin: ${input_obst_pin}
dry_contact_open_sensor: ${id_prefix}_dry_contact_open dry_contact_open_sensor: ${id_prefix}_dry_contact_open
dry_contact_close_sensor: ${id_prefix}_dry_contact_close dry_contact_close_sensor: ${id_prefix}_dry_contact_close
protocol: drycontact protocol: drycontact
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"
lock:
- platform: ratgdo
id: ${id_prefix}_lock_remotes
ratgdo_id: ${id_prefix}
name: "Lock remotes"
switch: switch:
- platform: gpio # - platform: gpio
id: "${id_prefix}_status_door" # id: "${id_prefix}_status_door"
internal: true # internal: true
pin: # pin:
number: ${status_door_pin} # number: ${status_door_pin}
mode: # mode:
output: true # output: true
name: "Status door" # name: "Status door"
entity_category: diagnostic # entity_category: diagnostic
- platform: gpio # - platform: gpio
id: "${id_prefix}_status_obstruction" # id: "${id_prefix}_status_obstruction"
internal: true # internal: true
pin: # pin:
number: ${status_obstruction_pin} # number: ${status_obstruction_pin}
mode: # mode:
output: true # output: true
name: "Status obstruction" # name: "Status obstruction"
entity_category: diagnostic # entity_category: diagnostic
binary_sensor: binary_sensor:
- platform: ratgdo # - platform: ratgdo
type: motion # type: motion
id: ${id_prefix}_motion # id: ${id_prefix}_motion
ratgdo_id: ${id_prefix} # ratgdo_id: ${id_prefix}
name: "Motion" # name: "Motion"
device_class: motion # device_class: motion
- platform: ratgdo - platform: ratgdo
type: obstruction type: obstruction
id: ${id_prefix}_obstruction id: ${id_prefix}_obstruction
ratgdo_id: ${id_prefix} ratgdo_id: ${id_prefix}
name: "Obstruction" name: "Obstruction"
device_class: problem device_class: problem
on_press: # on_press:
- switch.turn_on: ${id_prefix}_status_obstruction # - switch.turn_on: ${id_prefix}_status_obstruction
on_release: # on_release:
- switch.turn_off: ${id_prefix}_status_obstruction # - switch.turn_off: ${id_prefix}_status_obstruction
- platform: ratgdo # - platform: ratgdo
type: button # type: button
id: ${id_prefix}_button # id: ${id_prefix}_button
ratgdo_id: ${id_prefix} # ratgdo_id: ${id_prefix}
name: "Button" # name: "Button"
entity_category: diagnostic # entity_category: diagnostic
- platform: gpio - platform: gpio
id: "${id_prefix}_dry_contact_open" id: "${id_prefix}_dry_contact_open"
pin: pin:
@ -85,7 +70,7 @@ binary_sensor:
mode: mode:
input: true input: true
pullup: true pullup: true
name: "Dry contact open" name: "Open limit switch"
entity_category: diagnostic entity_category: diagnostic
filters: filters:
- delayed_on_off: 500ms - delayed_on_off: 500ms
@ -97,35 +82,26 @@ binary_sensor:
mode: mode:
input: true input: true
pullup: true pullup: true
name: "Dry contact close" name: "Close limit switch"
entity_category: diagnostic entity_category: diagnostic
filters: filters:
- delayed_on_off: 500ms - delayed_on_off: 500ms
- platform: gpio # - platform: gpio
id: "${id_prefix}_dry_contact_light" # id: "${id_prefix}_dry_contact_light"
pin: # pin:
number: ${dry_contact_light_pin} # number: ${dry_contact_light_pin}
inverted: true # inverted: true
mode: # mode:
input: true # input: true
pullup: true # pullup: true
name: "Dry contact light" # name: "Dry contact light"
entity_category: diagnostic # entity_category: diagnostic
filters: # filters:
- delayed_on_off: 500ms # - delayed_on_off: 500ms
on_press: # on_press:
- light.toggle: ${id_prefix}_light # - light.toggle: ${id_prefix}_light
number: number:
- platform: ratgdo
id: ${id_prefix}_rolling_code_counter
type: rolling_code_counter
entity_category: config
ratgdo_id: ${id_prefix}
name: "Rolling code counter"
mode: box
unit_of_measurement: "codes"
- platform: ratgdo - platform: ratgdo
id: ${id_prefix}_opening_duration id: ${id_prefix}_opening_duration
type: opening_duration type: opening_duration
@ -142,30 +118,16 @@ number:
name: "Closing duration" name: "Closing duration"
unit_of_measurement: "s" unit_of_measurement: "s"
- platform: ratgdo
id: ${id_prefix}_client_id
type: client_id
entity_category: config
ratgdo_id: ${id_prefix}
name: "Client ID"
mode: box
cover: cover:
- platform: ratgdo - platform: ratgdo
id: ${id_prefix}_garage_door id: ${id_prefix}_garage_door
device_class: garage device_class: garage
name: "Door" name: "Door"
ratgdo_id: ${id_prefix} ratgdo_id: ${id_prefix}
on_closed: # on_closed:
- switch.turn_off: ${id_prefix}_status_door # - switch.turn_off: ${id_prefix}_status_door
on_open: # on_open:
- switch.turn_on: ${id_prefix}_status_door # - switch.turn_on: ${id_prefix}_status_door
light:
- platform: ratgdo
id: ${id_prefix}_light
name: "Light"
ratgdo_id: ${id_prefix}
button: button:
- platform: restart - platform: restart
@ -176,24 +138,6 @@ button:
name: "Safe mode boot" name: "Safe mode boot"
entity_category: diagnostic entity_category: diagnostic
- platform: template
id: ${id_prefix}_query_status
entity_category: diagnostic
name: "Query status"
on_press:
then:
lambda: !lambda |-
id($id_prefix).query_status();
- platform: template
id: ${id_prefix}_sync
name: "Sync"
entity_category: diagnostic
on_press:
then:
lambda: !lambda |-
id($id_prefix).sync();
- platform: template - platform: template
id: ${id_prefix}_toggle_door id: ${id_prefix}_toggle_door
name: "Toggle door" name: "Toggle door"