homebridge-philips-hue-sync-box
Version:
Homebridge plugin for the Philips Hue Sync Box.
24 lines (19 loc) • 625 B
text/typescript
import type { PlatformAccessory } from 'homebridge';
import type { HueSyncBoxPlatform } from '../platform.js';
import type { State } from '../state.js';
import { SyncBoxDevice } from './base.js';
export class SwitchDevice extends SyncBoxDevice {
constructor(
protected readonly platform: HueSyncBoxPlatform,
public readonly accessory: PlatformAccessory,
protected state: State
) {
super(platform, accessory, state);
}
protected getPowerCharacteristic() {
return this.platform.api.hap.Characteristic.On;
}
protected getServiceType() {
return this.platform.api.hap.Service.Switch;
}
}