Skip to content

Expose Heiman smoke and CO sensor sirens as siren entities - #5143

Draft
TheJulianJES wants to merge 1 commit into
devfrom
zigpy-bot/heiman-attribute-siren
Draft

Expose Heiman smoke and CO sensor sirens as siren entities#5143
TheJulianJES wants to merge 1 commit into
devfrom
zigpy-bot/heiman-attribute-siren

Conversation

@TheJulianJES

@TheJulianJES TheJulianJES commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

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_automation attribute (cluster 0xFC90, attr 0x0012) that sounds the siren until cleared, with a selectable smoke/CO tone. The device also resets it to Stop on 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's unique_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.
  • discovery (zhaquirks/builder/discovery.py) — maps (SIREN, SirenMetadata) → ZHA's siren.AttributeSiren.
Per-quirk changes (all four files)
  • Dropped .exposes_feature(SIREN_BASIC) and the .change_entity_metadata(IasWd …) demotion.
  • Added .prevent_default_entity_creation(endpoint_id=1, cluster_id=IasWd.cluster_id) to suppress the default IAS WD siren.
  • Added .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

  • Depends on Add attribute-controlled siren entity for quirks v2 zha#816, which adds the AttributeSiren entity + EntityPlatform.SIREN this 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.
  • Possible restructure: AttributeSiren could instead live in this repo (subclassing ZHA's BaseSiren), keeping only EntityPlatform.SIREN in 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.
  • Translations: translation_key="siren" is a new key (no entity.siren section exists in ZHA's HA strings.json yet — 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). A co_siren slug would show literally as co_siren; if translated tone labels are wanted, a select entity 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 existing heiman-smokesensor-em.json is the unrelated legacy v1 SmokeSensor-EM), so there's nothing to regenerate. The custom clusters and models are unchanged from the already-merged quirks.

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works
  • Device diagnostics data has been attached

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.
@zigpy-review-bot zigpy-review-bot added the bot: unclear LLM is unsure about PR state label Jul 14, 2026
@zigpy-review-bot zigpy-review-bot added bot: nearly ready PR is good but needs a few minor tweaks per LLM bot: 2.0 migration done PR is on the ZHA/quirks 2.0.0 API (migrated or written for 2.0) per LLM enhancement Improve an existing quirk bot: needs maintainer PR does something questionable that needs a maintainer decision per LLM and removed bot: unclear LLM is unsure about PR state labels Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot: nearly ready PR is good but needs a few minor tweaks per LLM bot: needs maintainer PR does something questionable that needs a maintainer decision per LLM bot: 2.0 migration done PR is on the ZHA/quirks 2.0.0 API (migrated or written for 2.0) per LLM enhancement Improve an existing quirk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants