Skip to content

Commit

Permalink
Add support for 'StatusChange' to co/smoke detector. Fixes issue #92
Browse files Browse the repository at this point in the history
  • Loading branch information
dkerr64 committed Jan 4, 2024
1 parent 5faa42c commit 8e05aa2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Homebridge YoLink",
"name": "homebridge-yolink",
"version": "1.5.2",
"version": "1.5.3",
"description": "Connect to YoLink.",
"license": "Apache-2.0",
"repository": {
Expand Down
2 changes: 2 additions & 0 deletions src/coSmokeDetector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ export async function mqttCoSmokeDetector(this: YoLinkPlatformAccessory, message
switch (event[1]) {
case 'Alert':
// falls through
case 'StatusChange':
// falls through
case 'Report':
if (!device.data) {
// in rare conditions (error conditions returned from YoLink) data object will be undefined or null.
Expand Down

0 comments on commit 8e05aa2

Please sign in to comment.