Conversation
I'm in favor of ZCL base class entities inheriting from the abstract entity. There are few platforms where it actually helps (
This is an interesting API gap. We need entities whose discovery depends on the existence of another entity, right? This requires some discovery restructuring, because we right now assume all entities will be discovered in a single pass and thus they are assumed to be order-independent. Right now, we treat the entity itself as the smallest unit for encompassed functionality but I guess we could also think of this as a special case of entity "groups": where groups of entities are created by discovery, not just one? That way, the group of entities has shared discovery logic?
We currently have only a single |
With the current approach, we have the abstract
Hmm, I didn't even think about linking the select entities to the presence of the
I get that but I also feel like it's essentially a cleaner Let's assume we want to do the following:
|
466eb6b to
fc5c825
Compare
fc5c825 to
cbc2230
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #665 +/- ##
=======================================
Coverage 97.62% 97.62%
=======================================
Files 62 62
Lines 10764 10789 +25
=======================================
+ Hits 10508 10533 +25
Misses 256 256 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a “basic siren” entity variant for IAS WD devices that hides tone/volume/strobe controls, selected via a quirk “exposed feature”, and refactors shared IAS WD ZCL logic into a common base class.
Changes:
- Introduce
BasicSiren(feature-hinted) alongsideAdvancedSiren, sharing logic viaBaseZclSiren. - Add a new
PlatformFeatureGroup.SIRENto ensure only the highest-priority siren variant is created per device. - Extend siren tests and update device snapshot JSON expectations for the new class names/features.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| zha/application/platforms/siren.py | Adds BaseZclSiren, splits siren into AdvancedSiren vs BasicSiren, and adds feature-group prioritization. |
| zha/application/platforms/init.py | Introduces PlatformFeatureGroup.SIREN for siren entity selection. |
| tests/test_siren.py | Adds coverage for basic siren behavior and discovery via exposed feature. |
| tests/data/devices/*.json | Updates expected entity class names/features in device snapshots. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Proposed change
This adds a "basic siren" to ZHA, which does not expose tone + volume + strobe features. The matching is done via an "exposed feature" (formerly known as
quirk_id).Weirdly enough, all Zigbee sirens I've encountered so far do not expose these features. I'm wondering if it makes sense to flip this around, so have a "basic siren" by default, and "advanced siren" with a quirk. I'll need to look at diagnostics for that.
EDIT: It does look like some sirens we have in our diagnostics are intended to expose the more advanced options (looking at Z2M), so I probably wouldn't risk flipping it around now and feature hinting existing advanced sirens.
Additional information
Implementation
The latest commit
466eb6b(this PR) also introduces aBaseZclSiren(based onBaseSiren).Both
AdvancedSirenandBasicSirenthen inherit from theBaseZclSiren. This avoids some code duplication, but I'm not sure if it's fully worth it. If not, I can just revert the commit. Thoughts on this are appreciated.What it does
So far, this PR should remove these options:

Select entities
But not the useless non-ZCL select entities below. This would be easier to do with the exposed feature matching if we assume "basic" is the default, not "advanced". If we don't do that, we'll have to create separate entity classes and override
is_supportedOR checkis_supportedin the normal classes. (I think both should work?)Alternatively, we could also add
not_exposed_featuresto our discovery. It should be a very small change. Would also like opinions on this.Example of the useless select entities:

I think it makes the most sense to have these entities be removed in a follow-up PR, since it's a different platform. EDIT: See: