Hi All,
Hoping someone can help, as i cannot seeme to get my head around this.
I have followed DrZzs video and setup an esphome garage door Sonoff SV (replacing my old MQTT version, as it had issues). With my MQTT version, i had it connected to a reed switch to sense and display the door status, notifications to tell me when the door was activated (and the activation status), and an LED (positioned inside the house) which flashed continuously when the door was left open.
Basically, I have the new esphome version setup to display correct status using the reed switch, the controller (button) works as required, the LED will flash for 500ms when i activate it manually, BUT i cannot get my head around what i need to do to activate the flashing LED automatically when the door is up…
Do i need to give GPIO14 “Garage Door Test” an ID and then call the ID in an condition on the binary_sensor? or some other way? Is the Template in the right position? i need help…
I have added my yaml below.
As for the notifications on phone, i will work on this once i get the LED working…
Thanks in advance
binary_sensor:
- platform: gpio
pin:
number: GPIO14
mode: INPUT_PULLUP
inverted: True
name: "Garage Door Test"
device_class: garage_door
switch:
- platform: gpio
pin: GPIO12
id: relay_test
- platform: template
icon: "mdi:garage"
name: "Garage Test"
turn_on_action:
- switch.turn_on: relay_test
- delay: 500ms
- switch.turn_off: relay_test
- platform: gpio
pin: GPIO1
id: pin_test
- platform: template
name: "LED Test"
optimistic: yes
id: temp_test
turn_on_action:
- while:
condition:
lambda: 'return true;'
then:
- switch.turn_on: pin_test
- delay: 500ms
- switch.turn_off: pin_test
- delay: 500ms
turn_off_action:
- switch.turn_off: pin_test