Skip to content

Commit

Permalink
Fix camera alarm capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
JELoohuis committed Sep 20, 2024
1 parent e0d608b commit 3c8df5f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/camera/TuyaCameraConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const CAMERA_ALARM_CAPABILITIES = {
decibel_switch: 'alarm_sound',
cry_detection_switch: 'alarm_crying_child',
pet_detection: 'alarm_pet',
doorbell_active: 'hidden.doorbell',
} as const;

// Map from an event to an alarm capability
Expand Down
5 changes: 4 additions & 1 deletion lib/camera/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ class TuyaOAuth2DriverWithCamera extends TuyaOAuth2Driver {
}

// More complicated capabilities
if (constIncludes(COMPLEX_CAMERA_CAPABILITIES, capability)) {
if (
constIncludes(COMPLEX_CAMERA_CAPABILITIES, capability) ||
constIncludes(SIMPLE_CAMERA_CAPABILITIES.setting, capability)
) {
props.store.tuya_capabilities.push(capability);
}
}
Expand Down

0 comments on commit 3c8df5f

Please sign in to comment.