UNPKG

@viguza/homebridge-ezviz

Version:

A short description about what your plugin does.

29 lines (28 loc) 1 kB
import type { CharacteristicValue, PlatformAccessory } from 'homebridge'; import type { EZVIZPlatform } from '../platform.js'; import { EZVIZAPI } from '../api/ezviz-api.js'; /** * Smart Plug accessory for EZVIZ devices * Handles on/off functionality for smart plugs */ export declare class SmartPlug { private readonly platform; private readonly accessory; private api; constructor(api: EZVIZAPI, platform: EZVIZPlatform, accessory: PlatformAccessory); /** * Sets the on/off state of the smart plug * @param value - The value to set (true for on, false for off) */ setOnState(value: CharacteristicValue): Promise<void>; /** * Gets the current on/off state of the smart plug * @returns Promise resolving to the current state */ getOnState(): Promise<CharacteristicValue>; /** * Gets the accessory instance * @returns The platform accessory */ getAccessory(): PlatformAccessory<import("homebridge").UnknownContext>; }