Support for Loqed Lock

Is there any interest to implement alternative smart locks similar like Nuki.
I‘m quite satisfied with and have brought the Loqed as exchange to the nuki lock. What is much more robust and with nice use cases. The current HA implementation is so far working (except the status change, maybe I did something wrong…) but it would be nice to have a full/better integration.

Considering this lock as well +1 Bought it

+1, also installed one for testing. HA integration is a pain having the same status update issue

Hopefully Loqed will get their HA integration ready soon

I have integrated the lock with my Grandstream GDS3710 access system. Bit of programming but when now somebody rings at the frontdoor I get a HA notification with picture asking me if I want to open the door :yum:

Real pain in the ass to configure this. Can’t get it to work.

plus one for me, great lock like to see intergration for it, no idea how to add it otherwise


1 Like

HA integration would be great, i hope this comes soon. Great product

Just got the feedback from the devs of Loqed - they are already working on an implementation. Estimated release is around end of September 2021.

So there is hope to get a smooth solution soon :tada:


Did someone get an update from Loqed as the September timelines seems to have slipped?

And can someone who got this to work post details? I can’t get the status Webhooks to work via Nabu Casa.

I’ve contacted Loqed last month to ask about the release of the integration. They said it has been postponed for undetermined time. It appears that the integration is more complicated than thought…

So I went on trying to figure out how to use the proposed solution from their website.

Their instructions are not 100% accurate so here is the content of my (working) loqed.yaml

    - alias: Loqed Smart Lock status change
        platform: webhook
        webhook_id: !secret LOQED_WEBHOOK # http://your-home-assistant:8123/api/webhook/<webhook_id>
        service: rest_command.update_sensor
          entity_id: lock.Loqed_Smart_Lock
          lock_state: >
            {% if (trigger.json.requested_state == 'NIGHT_LOCK') %}
            {% elif (trigger.json.requested_state == 'DAY_LOCK') %}
            {% elif (trigger.json.requested_state == 'OPEN') %}
            {% else %}
            {% endif %}

    url: !secret LOQED_API_URL
    method: GET
    verify_ssl: true

    # If you are using HTTPS, ensure to put HTTPS below instead of HTTP
    url: !secret LOQED_SENSOR_URL
    method: POST
      authorization: !secret LOQED_AUTH_KEY
      accept: "application/json, text/html"
#      user-agent: 'Mozilla/5.0 {{ useragent }}'
    payload: '{"state":"{{ lock_state }}"}'
    content_type:  'application/json; charset=utf-8'
    verify_ssl: false

# Make a lock that supports OPEN and LOCKED. While the Loqed Smart Lock supports UNLOCKED as well, the lock template does not have support for a third state.
  - platform: template
    name: Loqed_Smart_Lock
    value_template: "{{ true }}" # todo: get the value by using a API call to Loqed server (not available yet)
    optimistic: false
      service: rest_command.loqed_action
        lock_state: "NIGHT_LOCK"
      service: rest_command.loqed_action
        lock_state: "OPEN" # You could put "DAY_LOCK" here as well, the lock will not fully open then.

I made some mistakes with some of the !secret data so below my "edited !secret content.

# ------------------------------------------------------------------------------
# Loqed:
# ------------------------------------------------------------------------------
LOQED_WEBHOOK: 'loqed_status'
LOQED_API_URL: '{{ lock_state }}&local_key_id=2'

LOQED_SENSOR_URL: 'https://<>/api/states/{{entity_id}}'
LOQED_AUTH_KEY: 'Bearer u2DFKwpoyJ0eXAiOiJKYz---------------------------YxTQ4OTc4OTc---------------------------FDJekjI'

Pay special attention to include Bearerand also make sure you edit the API URL (that you created on their website) to include the HASIO variable {{ lock_state }}


Thanks @erje for sharing your solution. Any idea why I would get this error?: Package loqed setup failed. Component rest_command has duplicate key 'url'

Hi Sorry for the late reply. Did you manage to fix it?

It sounds like you got a syntax error in your yaml. Very often caused by wrong line alignments.

My stupid mistake was that I left some old code in the configuration.yaml and tried to use yours as a package and so they collided.
So it works, but only as well as before, i.e. no status updates :man_shrugging:

I’m still waiting for the official support. As soon as it’s available, I’ll buy two.
The Loqed website still states ‘soon’.

They said the same to me somewhere on Facebook that they will release an app voor HA but there is still none. Have someone asked them the last weeks about the status of it?
I can’t get the solution erje says to work and i want to use an official app if there is one :slight_smile:

At the end of your post you write that the API URL on the Loqed website should include the HASIO variable.

On webhooks, in the webhook that will be called field I have: ‘domain api webhook loqed_status’. I had to remove the link here, could’nt do more then 2 links in the post. It’s over a secure channel, rest with backslashes in between.

My api key and api token (not url encoded) from de webhooks site, are both ending with an = sign. Do I delete this in the secrets file?

You talk about the loqed.yaml file. Where did you link to this file (and how)?

When I check the url section on the webhooks website, it shows this:
status: ‘

For night lock it shows: ‘

So, is the LOQED_API_URL right?

I can’t figure it out, if someone could help, that would be great, thanks!

Kind regards,

You don’t have to use a loged.yaml file. You can just include the code in the configuration.yaml But separating the configuration code has it’s advantages.

You find a detailed explanation here

But in short: At the top of my configuration.yaml:

  default: info
    pack_1: !include packages/01.cameras.yaml
    pack_2: !include packages/02.lights.yaml
    pack_3: !include packages/03.loqed.yaml
    pack_4: !include packages/04.telegram.yaml
    pack_5: !include packages/05.water_irrigation.yaml
    pack_6: !include packages/

I posted the content of my loqed.yaml in a previous post.

Your outgoing webhook should contain the URL from your local HAS installation e.g.

You don’t need the API Key or token, use the webhook URL instead. This contains all the info you need for your setup and just need a small adjustment.

You should note that 3 webhooks are almost identical accept for the lock_state=DAY_LOCK&local_key_id=2

This is the part you need to change in HAS into a variable. From my !secret.yaml:

LOQED_API_URL: '{{ lock_state }}&local_key_id=2'

{{ lock_state }}

Some more explaination about my !secret.yaml:

LOQED_WEBHOOK:  # The HAS webhook that will be listening for your lock. (the full URL will be http://your-home-assistant:8123/api/webhook/loqed_status but you ONLY put the webhook here, not the full URL
LOQED_API_URL: # This is the complete API URLs (URL encoded) from the Loqed webhook website (right column) Take any of the three (not status) and change the lock_state into a variable at the end of the line (see above)
LOQED_SENSOR_URL: #{{entity_id}}
LOQED_AUTH_KEY: # Bearer the Long-Lived Access Token you generated in your profile page in HAS


ps I noticed the webhook URL has changed from to The old URL is still working for me but I will update that in my setup. Don’t get confused by this.

Thank you so much, works now!

I can lock/unlock the door from Home Assistant but it doesn’t update the status.
My webhook is ‘’ without the https:// is that correct?