Help with Binary_Sensor for lock

I am having a hard time getting a binary_sensor to work correctly for my door lock. In home assistant it shows locked or unlocked. However when I include it in homekit it insists the ios Home app insists on showing the sensor as an occupancy sensor when I am expecting to see a lock. What am I missing? My device class is set to lock for the sensor.

Thanks for any suggestions.

1 Like

binary_sensor:
- platform: template
sensors:
door_lock:
friendly_name: “Door Lock”
device_class: lock
value_template: “{{ states(‘lock.front_door’) }}”

Did you ever figure this out? Same issue.

Same problem… It’s because Home Assistant HomeKit integration defaults anything that is not known as DEVICE_CLASS_OCCUPANCY. See here: Home Assistant Binary Sensor shows up as occupancy sensor in Apple Homekit : r/homeassistant

Wouldn’t mind figuring this out…