Expose Heiman smoke and CO sensor sirens as siren entities - #5143
Draft
TheJulianJES wants to merge 1 commit into
Draft
Expose Heiman smoke and CO sensor sirens as siren entities#5143TheJulianJES wants to merge 1 commit into
TheJulianJES wants to merge 1 commit into
Conversation
The HS1SA-E-Lover, HS1SA-E-PLUS, HS1CA-E-PLUS and HM-722ESY-E-PLUS expose a manufacturer-specific siren_for_automation attribute that sounds the siren until cleared, with a selectable smoke/CO tone. Replace the IAS WD siren (fixed tone, limited to ~30 s) with an attribute-controlled siren via the new QuirkBuilder.siren() method, reusing the IAS WD siren's unique_id so existing entities migrate. Add SirenMetadata and the .siren() builder method mapping to ZHA's AttributeSiren entity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DRAFT / EXPERIMENTAL.
Proposed change
The Heiman HS1SA-E-Lover, HS1SA-E-PLUS, HS1CA-E-PLUS and HM-722ESY-E-PLUS expose a manufacturer-specific
siren_for_automationattribute (cluster0xFC90, attr0x0012) that sounds the siren until cleared, with a selectable smoke/CO tone. The device also resets it toStopon its own after a timeout.Today these quirks expose the IAS WD siren, which is fixed-tone and limited by ZHA to ~30 s. This PR replaces it with an attribute-controlled siren via a new
QuirkBuilder.siren()method, so the siren is tone-selectable and sounds until turned off — and it reuses the IAS WD siren'sunique_id({ieee}-1-1282) so existing entities migrate rather than orphan.Builder API additions
SirenMetadata(zhaquirks/builder/metadata.py) —attribute_name,available_tones({value: name}),off_value,default_tone.QuirkBuilder.siren(...)(zhaquirks/builder/builder.py) — exposes a siren backed by writing an attribute.zhaquirks/builder/discovery.py) — maps(SIREN, SirenMetadata)→ ZHA'ssiren.AttributeSiren.Per-quirk changes (all four files)
.exposes_feature(SIREN_BASIC)and the.change_entity_metadata(IasWd …)demotion..prevent_default_entity_creation(endpoint_id=1, cluster_id=IasWd.cluster_id)to suppress the default IAS WD siren..siren(..., unique_id_suffix="1282")with tones{Smoke siren, CO siren}. Default tone = smoke for the smoke sensors, CO for the CO sensors.The IAS WD cluster itself is kept (only its siren entity is suppressed).
Additional information
AttributeSirenentity +EntityPlatform.SIRENthis PR imports. This PR's CI won't pass until that lands and releases; tone selection in the UI additionally needs the small HA Core change described in that PR. Siren on/off + state work with zha + this PR.AttributeSirencould instead live in this repo (subclassing ZHA'sBaseSiren), keeping onlyEntityPlatform.SIRENin ZHA. See the "Open question" section of Add attribute-controlled siren entity for quirks v2 zha#816 — it's a maintainer call and would move code from that PR into this one.translation_key="siren"is a new key (noentity.sirensection exists in ZHA's HAstrings.jsonyet — this would be the first). Tone values ("Smoke siren"/"CO siren") are not translated by HA — siren tones render raw, so human-readable names are used (matching the existing"Burglar"/"Fire"tones). Aco_sirenslug would show literally asco_siren; if translated tone labels are wanted, aselectentity is the alternative (details in the ZHA PR).Device diagnostics
No new diagnostics snapshots are required: none of the four affected models has a snapshot in ZHA's
tests/data/devices/(the existingheiman-smokesensor-em.jsonis the unrelated legacy v1SmokeSensor-EM), so there's nothing to regenerate. The custom clusters and models are unchanged from the already-merged quirks.Checklist
pre-commitchecks pass / the code has been formatted using Black