mirror of
https://github.com/koush/scrypted.git
synced 2026-06-21 00:50:30 +01:00
dummy-switch: friendly names on extensions
This commit is contained in:
4
plugins/dummy-switch/package-lock.json
generated
4
plugins/dummy-switch/package-lock.json
generated
@@ -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"
|
||||
|
||||
@@ -38,5 +38,5 @@
|
||||
"@scrypted/common": "file:../../common",
|
||||
"@scrypted/sdk": "file:../../sdk"
|
||||
},
|
||||
"version": "0.0.19"
|
||||
"version": "0.0.21"
|
||||
}
|
||||
|
||||
@@ -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[]> {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user