UNPKG

homebridge-philips-hue-sync-box

Version:
24 lines (19 loc) 609 B
import type { PlatformAccessory } from 'homebridge'; import { HueSyncBoxPlatform } from '../platform'; import { State } from '../state'; 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; } }