Add Doorbell device type to discovery schemas in Matter event entities - #175802
Conversation
|
Hey there @home-assistant/matter, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Pull request overview
This PR adds the Matter Doorbell device type to the event platform's discovery schema so that doorbell devices exposing a Switch cluster are surfaced as event entities (button press events), alongside the existing GenericSwitch device type. In Home Assistant's Matter discovery, device_type acts as an additional filter combined with the required Switch attributes (CurrentPosition, FeatureMap), so previously a Doorbell endpoint with a Switch cluster would be excluded because its device type wasn't GenericSwitch.
Changes:
- Extended the single event
MatterDiscoverySchema'sdevice_typetuple from(GenericSwitch,)to(Doorbell, GenericSwitch).
| device_type=( | ||
| device_types.Doorbell, | ||
| device_types.GenericSwitch, | ||
| ), |
Co-authored-by: Copilot <copilot@github.com>
| # name: test_events[mock_doorbell][event.mock_doorbell_button-state] | ||
| StateSnapshot({ | ||
| 'attributes': ReadOnlyDict({ | ||
| <EntityStateAttribute.DEVICE_CLASS: 'device_class'>: 'button', |
There was a problem hiding this comment.
Oh one thing to note, we now have a doorbell device class as well, but it requires a ring event type. Would maybe be cool to add, but I am not sure how that maps well with the event types you have right here

Proposed change
Add Doorbell device type to discovery schemas in Matter event entities
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: