dummy-switch: friendly names on extensions

This commit is contained in:
Koushik Dutta
2023-04-22 21:54:35 -07:00
parent 951c3b9be6
commit 63dcd35b17
5 changed files with 17 additions and 6 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/dummy-switch",
"version": "0.0.19",
"version": "0.0.21",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/dummy-switch",
"version": "0.0.19",
"version": "0.0.21",
"dependencies": {
"@types/node": "^16.6.1",
"axios": "^1.3.6"

View File

@@ -38,5 +38,5 @@
"@scrypted/common": "file:../../common",
"@scrypted/sdk": "file:../../sdk"
},
"version": "0.0.19"
"version": "0.0.21"
}

View File

@@ -92,13 +92,24 @@ class DummyDeviceProvider extends ScryptedDeviceBase implements DeviceProvider,
(async () => {
await deviceManager.onDeviceDiscovered(
{
name: 'Replace Motion Sensor',
name: 'Custom Motion Sensor',
nativeId: ReplaceMotionSensorNativeId,
interfaces: [ScryptedInterface.MixinProvider],
type: ScryptedDeviceType.Builtin,
},
);
})();
(async () => {
await deviceManager.onDeviceDiscovered(
{
name: 'Custom Doorbell Button',
nativeId: ReplaceBinarySensorNativeId,
interfaces: [ScryptedInterface.MixinProvider],
type: ScryptedDeviceType.Builtin,
},
);
})();
}
async getCreateDeviceSettings(): Promise<Setting[]> {

View File

@@ -65,7 +65,7 @@ export class ReplaceBinarySensor extends ScryptedDeviceBase implements MixinProv
async getMixin(mixinDevice: any, mixinDeviceInterfaces: ScryptedInterface[], mixinDeviceState: DeviceState): Promise<any> {
return new ReplaceBinarySensorMixin({
group: 'Replace Binary Sensor',
group: 'Custom Doorbell Button',
groupKey: 'replaceBinarySensor',
mixinDevice,
mixinDeviceInterfaces,

View File

@@ -65,7 +65,7 @@ export class ReplaceMotionSensor extends ScryptedDeviceBase implements MixinProv
async getMixin(mixinDevice: any, mixinDeviceInterfaces: ScryptedInterface[], mixinDeviceState: DeviceState): Promise<any> {
return new ReplaceMotionSensorMixin({
group: 'Replace Motion Sensor',
group: 'Custom Motion Sensor',
groupKey: 'replaceMotionSensor',
mixinDevice,
mixinDeviceInterfaces,