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 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]
});
}
};
}