Homekit - lock with code does not work?

Tags: #<Tag:0x00007f73a983c1a0>

Hello,

I created a Template Lock which works fine in the Home Assistant GUI.
This lock also works in my Homekit setup- but itdoes not work the way I imagine it:
In the docs of Homekit is described that you can use a code to toggle the lock but the the lock toggels without asking for a code?
I want to be asked for the code.
Is there anything wrong in my configuration?

I need to

Thank you for your help.

My template_lock:

lock:
  - platform: template
    name: garage
    value_template: "{{ is_state('binary_sensor.shelly_sw', 'off') }}"
    lock:
      service: switch.toggle
      data:
        entity_id: switch.shelly1_xxx_relay_0
    unlock:
      service: switch.toggle
      data:
        entity_id: switch.shelly1_xxx_relay_0

My Homekit integration:

homekit:
  - filter:
      include_domains:
        - media_player
        - lock
    entity_config:
      lock.garage:
        code: 1234
        name: Garage

My Home Assistant installation:

x x
arch aarch64
chassis embedded
dev false
docker true
docker_version 19.03.11
hassio true
host_os HassOS 4.13
installation_type Home Assistant OS
os_name Linux
os_version 4.19.127-v8
python_version 3.8.5
supervisor 245
timezone Europe/Berlin
version 0.115.5
virtualenv false
2 Likes