Skip to content

Add support for cocoa_doorbell_v3; KeyError in existing_doorbell_type on unmapped chime type 3 #543

Open

Description

@pkoken

Summary

Two related problems with a Ring battery doorbell whose API kind is cocoa_doorbell_v3:

  1. Unmapped device kind. The device appears in Home Assistant (core 2026.8.1, ring-doorbell 0.9.14) as "Unknown Doorbell". Only basic entities are created (camera, battery, volume, last_activity, wifi). The ding and motion event entities are not created, even though presses and motion alerts work normally in the Ring app. Same class as Add support for Ring Wired Video Doorbell Plus (2nd Gen) #521 (cocoa_doorbell_v4w) and Add support for Doorbell Pro (3rd Gen) #517 — cocoa_doorbell_v3 is not yet reported.

  2. Crash on unmapped in-home chime type. With the Ring app's In-Home Chime Type set to "Digital Type 2", the API returned chime_settings: {"type": 3}. DOORBELL_EXISTING_TYPE maps only 0/1/2, so existing_doorbell_type (ring_doorbell/doorbot.py:193) raises KeyError: 3, which aborts Home Assistant's entire ring switch platform for all devices in the account. This is the same defect as KeyError for unknown existing_doorbell_type values (3, 5) on newer doorbells #506 (chime types 3 and 5, cocoa_doorbell_v2), which included a mapping table and a proposed graceful-degradation fix but was closed as stale without a fix — this is a second affected device confirming KeyError for unknown existing_doorbell_type values (3, 5) on newer doorbells #506's type-3 mapping.

File "homeassistant/components/ring/switch.py", line 71, in <lambda>
    and device.existing_doorbell_type in IN_HOME_CHIME_IS_PRESENT
File "ring_doorbell/doorbot.py", line 193, in existing_doorbell_type
    return DOORBELL_EXISTING_TYPE[dtype]
KeyError: 3

Workaround confirmed: setting In-Home Chime Type to "None" in the Ring app changes the API value to type: 2 and the switch platform loads again.

Suggest (a) adding cocoa_doorbell_v3 to the doorbell kind mappings, and (b) implementing #506's Option 2 — existing_doorbell_type returning a safe default/None for unknown chime type values instead of raising — so one unmapped device can't take down the platform.

Device

  • API kind: cocoa_doorbell_v3 (also health.device_type)
  • Battery present (QRBPv1, reports 100%), wired power also present (ac_power: 1, ext_power_state: 3)
  • Firmware: cam-1.32.12100
  • Added to account: 2026-05-24

Environment

  • Home Assistant OS, core 2026.8.1
  • ring-doorbell 0.9.14 (latest at time of report)

Full integration diagnostics available on request (redacted dump).

Activity

  1. ICanKittens commented on Aug 17, 2026

    @ICanKittens

    same for "kind": "cocoa_doorbell_v5".

  2. yosandan13 commented on Aug 21, 2026

    @yosandan13

    Confirming the "Unknown Doorbell" half of this report on a separate installation.

    Environment

    Home Assistant core 2026.8.1
    ring-doorbell 0.9.14
    Device

    Battery Doorbell Pro, API kind cocoa_doorbell_v3
    Registers in Home Assistant as "Unknown Doorbell"
    Impact

    No event._ding, no event._motion, no switch.*_motion_detection are created, so the doorbell cannot trigger any automation — neither a press nor motion — while both work normally in the Ring app. Only camera, battery, volume and last-activity entities appear.

    I did not hit the KeyError: 3 on existing_doorbell_type, which is consistent with the reporter's analysis that it depends on the In-Home Chime Type setting ("Digital Type 2") rather than on the device kind itself. The two problems in this issue look independent and could be fixed separately.

    Suggested fix for the mapping half

    DOORBELL_GEN2_KINDS = ["cocoa_doorbell", "cocoa_doorbell_v2", "cocoa_doorbell_v3"]
    Seconding the request for graceful degradation on unmapped values: an unknown chime type taking down the whole switch platform is a harsh failure mode, and the same argument applies to unmapped kinds — falling back to a base capability set would be preferable to creating no functional entities at all.

    Happy to provide redacted diagnostics if useful.

  3. HumanMeatSack commented on Sep 19, 2026

    @HumanMeatSack

    I reproduced the missing-event-entities problem with cocoa_doorbell_v3 on Home Assistant 2026.7.4 / ring-doorbell 0.9.14 and tested a narrow HA-layer workaround. The chime type was already 2, so no chime-setting change was needed.

    Keeping the existing capability checks, I additionally allowed DING/MOTION_DETECTION event entities only for that exact kind in the doorbots/authorized_doorbots families. Actual button presses and motion then reached Home Assistant. This does not change model naming, library-wide controls, or account settings.

    Sanitized patch, builder, synthetic tests and reproduction steps: https://gist.github.com/HumanMeatSack/8960a1d22c932859c40e8045b5e0abed

    The test also exposed a separate HA-side replay issue: when motion arrives while an earlier ding is still cached, both event entities can emit because the earlier alert remains is_update=False. A per-entity RingEventKey guard prevents that replay. All 11 offline tests pass, and the replay checks fail without the guard. The final combined revision loaded successfully; a further physical trigger was not repeated after the duplicate-only change.

    Would these tests and the workaround be useful for a native cocoa_doorbell_v3 contribution? I can adapt the model-support portion to the library's preferred approach. The HA-side duplicate guard can be handled separately if that belongs in Home Assistant Core. The linked bundle contains synthetic fixtures and no account/device diagnostics or personal configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions