Is there a way to create an 'unlock' button for a Lock?

Hi all,
I have a simple door strike that I want to be able to ‘buzz someone in’ - I have it configured as a lock, working fine via automations because I can send an unlock command but with the UI, it can only toggle lock/unlock, whereas I would always want to assume it’s locked, so always send an ‘unlock’ command

What is the best way to achieve this? Is there a way to revert the lock back to a locked state automatically without actually sending a lock command?

You could always setup an automation that

if the lock is unlocked for > x time and door = closed (if you have a sensor) then lock.

And for the unlock, write a script that calls the unlock service. Assign it to a button card tap action.

1 Like

I don’t want it to fire a lock action, I just want to set the status to locked. The unlock is fine the way I have it, no problems there. If i send a ‘lock’ signal, it sounds an alarm, since its interpreted as ‘access denied’

The problem is, since the status is persistent, i have to hit the button twice every time to lock it again (sounding alarm), then unlock. I just want it to revert to locked after x seconds automatically.

This should do it:

trigger:
  - platform: state
    entity_id: lock.your_lock
    to: 'unlocked'
    for: 3 # or however many seconds you want
    not_from:
      - unavailable
      - unknown
action:
  - service: lock.lock
    target:
      entity_id: lock.your_lock

Thanks, but this doesn’t do what I want. I need to be able to update the status of the lock, without actually sending the command.

Now that I think about it, I might be able to fake it with node-red- The device is running from MQTT. with any luck I can create a fake ‘status’ topic for the device, and use node-red to publish back to that topic after x seconds.

That actually worked perfectly. Although, technically, you can get away without node-red since it never receives a status update so it never changes to ‘unlocked’

image