home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74k stars 31.05k forks source link

homekit bridge linked_doorbell_sensor is an invalid option for homekit locks and is only available for cameras #129443

Open krauseerl opened 4 weeks ago

krauseerl commented 4 weeks ago

The problem

2024.8 brings support for an event entity as a linked_doorbell_sensor in homekit bridge. 2024.9 should also enable events for linked_doorbell_sensor (see #123991)

documentation says:

linked_doorbell_sensor string (Optional) The entity_id of a binary_sensor or event entity to use as the doorbell sensor of the camera accessory to enable doorbell notifications.

My homekit config in configuration.yaml:

- name: HomeKit Ring.com
  port: 21065
  mode: accessory
  filter:
    include_entities:
      - lock.mydoor
  entity_config:
    lock.mydoor:
      low_battery_threshold: 25
      linked_doorbell_sensor: event.mydoor_doorbell
      linked_battery_sensor: sensor.mydoor_battery

checking config in developer tools produces this warning:

Invalid config for 'homekit' at homekit.yaml, line 28: 'linked_doorbell_sensor' is an invalid option for 'homekit', check: homekit->2->entity_config->linked_doorbell_sensor

If you ignore that warning and restart anyway, homekit bridge doesn't reload. I am using ring.com integration

What version of Home Assistant Core has the issue?

core-2024.10.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Homekit Bridge

Link to integration documentation on our website

https://www.home-assistant.io/integrations/homekit

Diagnostics information

No response

Example YAML snippet

- name: HomeKit Ring.com
  port: 21065
  mode: accessory
  filter:
    include_entities:
      - lock.mydoor
  entity_config:
    lock.mydoor:
      low_battery_threshold: 25
      linked_doorbell_sensor: event.mydoor_doorbell
      linked_battery_sensor: sensor.mydoor_battery

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 4 weeks ago

Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (homekit) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `homekit` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign homekit` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


homekit documentation homekit source (message by IssueLinks)

Scally0815 commented 3 weeks ago

Same problem here

bdraco commented 3 weeks ago

It must be a camera not a lock

krauseerl commented 3 weeks ago

Could that not be a use-case for a lock with a doorbell, but without a camara, too?

I am living in an older house with many flats and could not add a camara to the door. That's why I am using a ring intercom to open the door. Ring intercom allows me to control that with the ring app and with home assistant, but I also want to integrate it into my homekit

I had set up a homebridge just to integrate ring in homekit and it worked as well, but I don't want to have a virtual machine running just for this integration.

krauseerl commented 2 weeks ago

@bdraco what are you thinking about this use-case?

bdraco commented 2 weeks ago

Assuming HomeKit is ok with the doorbell being the primary service on a lock, I think we could accept a PR to add support to locks.

https://github.com/home-assistant/core/blob/433321136de91051ebc879c2f4d03cb9d8454a22/homeassistant/components/homekit/type_cameras.py#L242 would need to be broken out into a mixin, the schema would need to be updated in util.py, docs would need to be written, and tests added