Add a on_hk_start trigger to measure hk latency#33
Conversation
WalkthroughThe changes extend the HomeKit integration by adding a new trigger for automation events. A new Python trigger class ( Changes
Sequence Diagram(s)sequenceDiagram
participant Config as Automation Config
participant HomekitPy as HomeKit Python Layer
participant LockEntity as LockEntity
participant HKStartTrig as HKStartTrigger
Config->>HomekitPy: Define OnHkStartTrigger and update CONFIG_SCHEMA
HomekitPy->>LockEntity: Call register_onhkstart_trigger(trigger)
LockEntity->>LockEntity: Store HKStartTrigger in triggers_onhk_start_
Note over LockEntity: When HomeKit start event occurs
LockEntity->>HKStartTrig: Call process() on each registered trigger
HKStartTrig-->>LockEntity: Trigger event processed
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
🔇 Additional comments (9)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
4e3bba5 to
e37b956
Compare
I was tracking down some latency in a lock I built with this project and found it helpful to add a trigger before the homekit handshake. I imagine this could be generally useful if someone wanted to flash a light or provide some other feedback that the nfc read had completed.
Summary by CodeRabbit