Closed PilaScat closed 1 week ago
Control is on pin 5, change the yaml whatever you want
switch:
# Door Lock Opener "Momentary Switch" Keeps SSR ON for 1.5s.
- platform: gpio
pin: 5
id: Lock
name: "Lock"
icon: "mdi:lock"
restore_mode: ALWAYS_OFF
on_turn_on:
- delay: 1500ms
- switch.turn_off: Lock
What I meant was if it was possible to use a button instead of a switch on Home Assistant, but that's a small thing, if you can't do it easily, never mind
Not tested. If it works, please let me know.
switch:
- platform: gpio
pin: 5
id: UnlockSwitch
name: "Unlock Switch"
icon: "mdi:lock"
restore_mode: ALWAYS_OFF
internal: true
button:
- platform: gpio
id: UnlockButton
name: "Unlock Button"
on_press:
- switch.turn_on: UnlockSwitch
- delay: 1500ms
- switch.turn_off: UnlockSwitch
ok thanks, when it arrives I'll do the test, probably 1/2 weeks since I'm on holiday
Is it possibile?