WIP dynamic platform

This commit is contained in:
Arne Blumentritt
2021-04-28 20:07:39 +02:00
parent 6f1f078ba4
commit 4a97891dfd
7 changed files with 318 additions and 314 deletions

View File

@@ -0,0 +1,19 @@
import type { Characteristic, WithUUID } from 'homebridge';
import { Formats, Perms } from 'homebridge';
export default function spotHeight(CustomCharacteristic: typeof Characteristic): WithUUID<new () => Characteristic> {
return class SpotHeight extends CustomCharacteristic {
static readonly UUID = 'CA282DB2-62BF-4325-A1BE-F8BB5478781A';
constructor() {
super('Spot ↕', SpotHeight.UUID, {
format: Formats.INT,
unit: 'cm',
maxValue: 400,
minValue: 100,
minStep: 50,
perms: [Perms.PAIRED_READ, Perms.PAIRED_WRITE]
});
}
};
}

View File

@@ -0,0 +1,15 @@
import type { Characteristic, WithUUID } from 'homebridge';
import { Formats, Perms } from 'homebridge';
export default function spotRepeat(CustomCharacteristic: typeof Characteristic): WithUUID<new () => Characteristic> {
return class SpotRepeat extends CustomCharacteristic {
static readonly UUID = '1E79C603-63B8-4E6A-9CE1-D31D67981831';
constructor() {
super('Spot 2x', SpotRepeat.UUID, {
format: Formats.BOOL,
perms: [Perms.PAIRED_READ, Perms.PAIRED_WRITE]
});
}
};
}

View File

@@ -0,0 +1,19 @@
import type { Characteristic, WithUUID } from 'homebridge';
import { Formats, Perms } from 'homebridge';
export default function spotWidth(CustomCharacteristic: typeof Characteristic): WithUUID<new () => Characteristic> {
return class SpotWidth extends CustomCharacteristic {
static readonly UUID = 'A7889A9A-2F27-4293-BEF8-3FE805B36F4E';
constructor() {
super('Spot ↔', SpotWidth.UUID, {
format: Formats.INT,
unit: 'cm',
maxValue: 400,
minValue: 100,
minStep: 50,
perms: [Perms.PAIRED_READ, Perms.PAIRED_WRITE]
});
}
};
}