Skip to content

Add optional Mute characteristic to Doorbell service - #211

Merged
yfre merged 1 commit into
masterfrom
fix/doorbell-mute
Oct 19, 2026
Merged

yfre merged 1 commit into
masterfrom
fix/doorbell-mute

Conversation

@yfre

@yfre yfre commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

What

DoorbellService now adds the optional Mute characteristic (11A) when the accessory implements AccessoryWithMute, like it already does for Name, Brightness and Volume. It also gets an addOptionalCharacteristic(MuteCharacteristic) overload.

Why

Mute is an optional characteristic of the Doorbell service (see the HAP-NodeJS Doorbell definition). The 2.0.1 changelog says "Add Mute characteristic to Doorbell service", but commit 40e0338 wired Mute into DoorService instead, and DoorbellService never got it.

Compatibility

Purely additive. Doorbells that don't implement AccessoryWithMute are unchanged.

DoorService keeps its Mute support: removing it would drop a public method, and nothing requires the change.

Testing

mvn -B package on JDK 11: all 23 tests pass. The new DoorbellServiceTest covers:

  • a doorbell without optional characteristics still exposes only the switch event
  • with AccessoryWithMute, the Mute characteristic is added, reports the accessory's state and forwards writes to setMute

Note: like #207, #209 and #210, this adds a # HAP-Java 2.0.10 section to CHANGES.md.

Mute is an optional characteristic of the Doorbell service. The 2.0.1
changelog lists it for the Doorbell service, but it was only wired into
DoorService. DoorService is left unchanged to stay compatible.
@yfre
yfre merged commit 46e2a02 into master Oct 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants