Add support in zha for the new glass_break binary sensor entity / device class exposed in Home Assistant?

オープン
#896 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
embedded-iot

調査の方向性

Start with zha/application/platforms/binary_sensor/device_class.py, which the issue names as the place for a new glass_break device class, and read how existing binary sensor classes are mapped. The issue also refers to IAS Zone cluster 0x0500 with zone type 0x0226, so check how ZHA currently handles IAS zone types. Done means a glass_break class is exposed for that zone type. The issue has no comments and no test hardware, so confirm the scope with maintainers before writing code.

索引モデルが issue の本文から書いたものです。

説明

Add support in zha for glass_break binary sensor entity / device class to better expose Zigbee IAS glass break sensors in Home Assistant?

Would it be a good idea to add glass break device type as another device class for binary sensors to the binary_sensor platform?

Should be possible if Zigbee Vibration/Shock/Acoustic Sensors have specialized Zigbee Intruder Alarm System (IAS) profile for a glass break sensor. With the use case for allowing burglar alarms to use glass break detectors for detecting window / glass breaking, with sensors installed on any glass surface to alert home owners when the glass surface is tampered with, shattered or broken.

Zigbee Cluster Library (ZCL) does not have its own dedicated standalone glassbreak cluster for a glass break sensor, however glass-break sensor and events are natively implemented under Zigbee's IAS Zone Cluster (Intruder Alarm System), which uses the Cluster ID 0x0500 which can define a IAS Zone with type 0x0226 to specify it as a glass break sensor using the ZoneType alarm attributes for glass breakage on an Zigbee IAS glass break sensor (to instantly report detected glass shattering).

Use the dedicated glass_break binary sensor device class for this integration's explicit glass-break signal event, similar to how done in these pull requests:

Disclaimer; I do not actually own any devices myself that specifically exposes IAS Zone type 0x0226 to specifcially expose "glass break". There are plently of Zigbee devices available that are marketed as Glass Break Detector products but not sure if the less expensive models just expose vibration as binary sensor or if they also expose the proper IAS Zone to indicate glass breakage as a binary sensor. Example:

  • SMC SMCGB01-Z Glass Brake Sensor
  • Climax SVGS-1ZBS ZigBee Shock and Glass Break Sensor
  • Visonic GB-540 ZigBee Wireless Acoustic Glass Break Detector

Home Assistant reference:

Link to Home Assistant's core (backend) pull request: https://github.com/home-assistant/core/pull/181332
Link to Home Assistant's frontend pull request: https://github.com/home-assistant/frontend/pull/53989
Link to Home Assistant's ADR (Architecture Decision Record): https://github.com/home-assistant/architecture/issues/747
Link to Home Assistant's architecture discussion: https://github.com/home-assistant/architecture/discussions/1455
Link to Home Assistant's documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/47902
Link to Home Assistant's developer documentation pull request: https://github.com/home-assistant/developers.home-assistant/pull/3335

主要言語
Python
スター
96
フォーク
84
平均マージ
3日 1時間
マージ済み PR(30日)
13

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

zigpy/zha のほかの issue

zigpy/zha の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。