Add door opener button
This commit is contained in:
parent
8b83a6a1ef
commit
f187754465
1 changed files with 15 additions and 0 deletions
|
|
@ -44,6 +44,10 @@ output:
|
|||
output: true
|
||||
open_drain: true
|
||||
id: btn_lock
|
||||
- platform: gpio
|
||||
pin:
|
||||
number: GPIO3
|
||||
id: btn_open
|
||||
|
||||
lock:
|
||||
- platform: template
|
||||
|
|
@ -62,3 +66,14 @@ lock:
|
|||
- output.turn_off: btn_unlock
|
||||
- delay: 5s
|
||||
- lambda: id(tuerschloss).publish_state(LOCK_STATE_UNLOCKED);
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
name: "Türöffner"
|
||||
id: tueroeffner
|
||||
icon: mdi:lock-open
|
||||
on_press:
|
||||
- logger.log: "Button pressed"
|
||||
- output.turn_on: btn_open
|
||||
- delay: 250ms
|
||||
- output.turn_off: btn_open
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue