Hello,
AFAIK HomeKit doesn’t support buttons, you can expose lock entity for HomeKit (you should do it using accessory mode, more info you can find here) and use it, or you can make switch like this and expose it to HomeKit:
switch:
- platform: template
switches:
door_lock:
friendly_name: Door Lock
icon_template: mdi:lock
value_template: "{{ not is_state('timer.door_lock', 'active') }}"
turn_on:
- service: lock.unlock
data:
entity_id: lock.door_lock
turn_off:
Sure, if you don’t need the lock entity in Home Assistant, you can remove it from configuration, and in this switch instead service: lock.unlock use service: dahua_vto.open_door as in your button.
Hope this helps.