Skip to content
Discussion options

You must be logged in to vote

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

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jpbaril
Comment options

@PricelessToolkit
Comment options

Answer selected by jpbaril
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants