WIP dynamic platform
This commit is contained in:
19
src/characteristics/spotHeight.ts
Normal file
19
src/characteristics/spotHeight.ts
Normal 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]
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
15
src/characteristics/spotRepeat.ts
Normal file
15
src/characteristics/spotRepeat.ts
Normal 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]
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
19
src/characteristics/spotWidth.ts
Normal file
19
src/characteristics/spotWidth.ts
Normal 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]
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user