This commit is contained in:
J. Nick Koston 2023-06-09 14:38:21 -05:00
parent 87ad28844c
commit aecee4306e
No known key found for this signature in database
1 changed files with 13 additions and 2 deletions

View File

@ -42,6 +42,7 @@ binary_sensor:
device_class: running
entity_category: diagnostic
- platform: gpio
id: "${id_prefix}_dry_contact_open"
pin:
number: D5 # D5 dry contact for opening door
inverted: true
@ -51,8 +52,13 @@ binary_sensor:
name: "${friendly_name} Dry contact open"
entity_category: diagnostic
on_press:
- cover.open: ${id_prefix}_garage
- if:
condition:
binary_sensor.is_off: ${id_prefix}_dry_contact_close
then:
- cover.open: ${id_prefix}_garage
- platform: gpio
id: "${id_prefix}_dry_contact_close"
pin:
number: D6 # D6 dry contact for closing door
inverted: true
@ -62,8 +68,13 @@ binary_sensor:
name: "${friendly_name} Dry contact close"
entity_category: diagnostic
on_press:
- cover.close: ${id_prefix}_garage
- if:
condition:
binary_sensor.is_off: ${id_prefix}_dry_contact_open
then:
- cover.close: ${id_prefix}_garage
- platform: gpio
id: "${id_prefix}_dry_contact_light"
pin:
number: D3 # D3 dry contact for triggering light (no discrete light commands, so toggle only)
inverted: true