Why is the ESPBell (un)locking entity a 'switch' and not a 'lock' ? #31
-
Not a problem per se, but I was curious as to why the (un)locking entity was a 'switch' component and not a 'lock' one?
But am I wrong to think I would also have to set 'restore_mode' to 'ALWAYS_ON' since I think the default (and 'true') state of a lock is "locked" ? Thanks BTW, I LOVE my ESPBell-lite ! Such a good life improvement! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
"Why is the ESPBell (un)locking entity a 'switch' and not a 'lock' ?" I think there is no difference. It is lock or switch, it needs to be "ALWAYS_OFF". When I do the next production batch, I will test and update the lock entity. Thank you!! |
Beta Was this translation helpful? Give feedback.
-
Added example for lock entity in the instruction switch:
- platform: gpio
pin: 5
id: lock_relay
restore_mode: ALWAYS_OFF
- platform: gpio
pin: 2
id: led_switch
inverted: true
restore_mode: ALWAYS_OFF
- platform: restart
name: ${name} restart
lock:
- platform: template
name: ${name} Lock
id: ent_lock
icon: "mdi:lock"
optimistic: true
on_unlock:
- switch.turn_on: led_switch
- switch.turn_on: lock_relay
- delay: 1.5s # Change opening time here
- switch.turn_off: lock_relay
- switch.turn_off: led_switch
- lock.lock: ent_lock
|
Beta Was this translation helpful? Give feedback.
Added example for lock entity in the instruction