UNPKG

homebridge-lirc-tv

Version:
55 lines (54 loc) 2.37 kB
import type { PlatformAccessory, CharacteristicValue, CharacteristicSetCallback, CharacteristicGetCallback } from 'homebridge'; import { LIRC } from './platform'; /** * Platform Accessory * An instance of this class is created for each accessory your platform registers * Each accessory may expose multiple services of different service types. */ export declare class LIRCTelevision { private readonly platform; private readonly accessory; private tvService; private tvSpeakerService; private controller; /** * These are just used to create a working example * You should implement your own code to track the state of your accessory */ private states; constructor(platform: LIRC, accessory: PlatformAccessory); /** * Handle "SET" requests from HomeKit * These are sent when the user changes the state of an accessory. */ setActive(value: CharacteristicValue, callback: CharacteristicSetCallback): void; /** * Handle the "GET" requests from HomeKit * These are sent when HomeKit wants to know the current state of the accessory, for example, checking if a Light bulb is on. * * GET requests should return as fast as possbile. A long delay here will result in * HomeKit being unresponsive and a bad user experience in general. * * If your device takes time to respond you should update the status of your device * asynchronously instead using the `updateCharacteristic` method instead. * @example * this.tvService.updateCharacteristic(this.platform.Characteristic.On, true) */ getActive(callback: CharacteristicGetCallback): void; /** * Handle "SET" requests from HomeKit * These are sent when the user changes the state of an accessory. */ setActiveIdentifier(value: CharacteristicValue, callback: CharacteristicSetCallback): void; /** * Handle "SET" requests from HomeKit * These are sent when the user changes the state of an accessory. */ setMute(value: CharacteristicValue, callback: CharacteristicSetCallback): void; /** * Handle "SET" requests from HomeKit * These are sent when the user changes the state of an accessory. */ setVolume(value: CharacteristicValue, callback: CharacteristicSetCallback): void; } //# sourceMappingURL=platformAccessory.d.ts.map