Skip to content

Commit

Permalink
Fix logic issue with garage door. (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
gwaland authored Dec 22, 2022
1 parent 30ee298 commit d7e0b84
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions athom-garage-door.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ substitutions:
name: "athom-garage-door"
friendly_name: "Athom Garage Door"
project_name: "athom.garage-door"
project_version: "1.0"
project_version: "1.1"

esphome:
name: "${name}"
Expand Down Expand Up @@ -99,11 +99,21 @@ cover:
name: "${friendly_name}"
lambda: "return id(contact).state ? COVER_OPEN : COVER_CLOSED;"
open_action:
- switch.turn_on: relay
then:
- if:
condition:
lambda: 'return !id(contact).state;'
then:
- switch.turn_on: relay
stop_action:
- switch.turn_on: relay
close_action:
- switch.turn_on: relay
then:
- if:
condition:
lambda: 'return id(contact).state;'
then:
- switch.turn_on: relay

text_sensor:
- platform: wifi_info
Expand Down

0 comments on commit d7e0b84

Please sign in to comment.