Skip to content

Commit

Permalink
alexa: fix doorbells
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Jun 25, 2023
1 parent ce5f568 commit be888d2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions plugins/alexa/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/alexa/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@scrypted/alexa",
"version": "0.2.5",
"version": "0.2.6",
"scripts": {
"scrypted-setup-project": "scrypted-setup-project",
"prescrypted-setup-project": "scrypted-package-json",
Expand Down
6 changes: 3 additions & 3 deletions plugins/alexa/src/types/doorbell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { supportedTypes } from ".";
supportedTypes.set(ScryptedDeviceType.Doorbell, {
async discover(device: ScryptedDevice): Promise<Partial<DiscoveryEndpoint>> {
let capabilities: any[] = [];
let category: DisplayCategory = 'DOORBELL';
const displayCategories: DisplayCategory[] = ['DOORBELL'];

if (device.interfaces.includes(ScryptedInterface.RTCSignalingChannel)) {
capabilities = await getCameraCapabilities(device);
category = 'CAMERA';
displayCategories.push('CAMERA');
}

if (device.interfaces.includes(ScryptedInterface.BinarySensor)) {
Expand All @@ -25,7 +25,7 @@ supportedTypes.set(ScryptedDeviceType.Doorbell, {
}

return {
displayCategories: [category],
displayCategories,
capabilities
};
},
Expand Down

0 comments on commit be888d2

Please sign in to comment.