Homekit - lock with code does not work?

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

I have the same problem.
@Marius82 Did you find a solution about it? If not we should be opening an issue at github…

Sebastian

Sorry, I didn’t find a solution:(

OK, I opened an issue at github:

maybe you can comment it with your information as well. Thanks!

Sebastian