import { Service, PlatformAccessory, Characteristic } from "homebridge";
import { YeelighterPlatform } from "./platform";
import { YeeAccessory, OverrideLightConfiguration } from "./yeeaccessory";
import { Specs } from "./specs";
import { Device } from "./yeedevice";
export declare const POWERMODE_DEFAULT = 0;
export declare const POWERMODE_CT = 1;
export declare const POWERMODE_HSV = 3;
export declare const POWERMODE_MOON = 5;
export interface Attributes {
    power: boolean;
    color_mode: number;
    bright: number;
    hue: number;
    sat: number;
    ct: number;
    bg_power: boolean;
    bg_bright: number;
    bg_hue: number;
    bg_sat: number;
    bg_ct: number;
    bg_lmode: number;
    nl_br: number;
    active_mode: number;
    name: string;
}
export declare const EMPTY_ATTRIBUTES: Attributes;
export declare function powerModeFromColorModeAndActiveMode(color_mode: number, active_mode: number): 0 | 1 | 3 | 5;
/**
 * Converts a color temperature in Kelvin to a mired value for Homebridge.
 * The mired value is the reciprocal of the color temperature in microreciprocal degrees.
 * The formula is: mired = 1,000,000 / kelvin.
 * Therefore it can also be used for reversed: kelvin = 1,000,000 / mired.
 *
 * @param kelvin - The color temperature in Kelvin (e.g., 2000K to 6500K).
 * @returns The corresponding value in mireds (HomeKit-compatible scale).
 */
export declare function convertColorTemperature(kelvin: number): number;
export declare function isValidValue(value: unknown): boolean;
export interface ConcreteLightService {
    service: Service;
    onAttributesUpdated: (newAttributes: Attributes) => void;
    onPowerOff: () => void;
    updateName(value: string): any;
}
export interface LightServiceParameters {
    platform: YeelighterPlatform;
    readonly accessory: PlatformAccessory;
    light: YeeAccessory;
}
/**
 * Base class for services representing a light. This is a mixin class that is
 * used by the concrete light services.
 */
export declare class LightService {
    protected subtype?: string | undefined;
    service: Service;
    protected powerMode: number;
    protected lastHue?: number;
    protected lastSat?: number;
    protected readonly platform: YeelighterPlatform;
    protected readonly accessory: PlatformAccessory;
    protected light: YeeAccessory;
    protected name: string;
    private debounceTimers;
    constructor(parameters: LightServiceParameters, subtype?: string | undefined);
    cancelAllDebounces(): void;
    get detailedLogging(): boolean;
    updateName(value: string): void;
    protected get device(): Device;
    private get logPrefix();
    log: (message?: unknown, ...optionalParameters: unknown[]) => void;
    warn: (message?: unknown, ...optionalParameters: unknown[]) => void;
    error: (message?: unknown, ...optionalParameters: unknown[]) => void;
    debug: (message?: unknown, ...optionalParameters: unknown[]) => void;
    protected get config(): OverrideLightConfiguration;
    get specs(): Specs;
    attributes(): Promise<Attributes>;
    getAttribute<U extends keyof Attributes>(attribute: U): Promise<Attributes[U]>;
    setAttributes(attributes: Partial<Attributes>): void;
    protected handleCharacteristic(uuid: any, getter: () => Promise<any>, setter: (value: any) => void): Characteristic;
    protected updateCharacteristic(uuid: any, value: boolean | number | string): Promise<void>;
    onPowerOff: () => void;
    protected sendCommandPromiseWithErrorHandling(method: string, parameters: Array<string | number | boolean>): Promise<void>;
    protected sendCommand(method: string, parameters: Array<string | number | boolean>): Promise<void>;
    protected sendSuddenCommand(method: string, parameter: string | number | boolean): Promise<void>;
    protected sendSmoothCommand(method: string, parameter: string | number | boolean): Promise<void>;
    protected sendAnimatedCommand(method: string, parameters: string | number | boolean | Array<number>): Promise<void>;
    protected saveDefaultIfNeeded(): void;
    protected ensurePowerMode(mode: number, prefix?: string): Promise<void>;
    protected setHSV(prefix?: string): Promise<void>;
    protected updateColorFromCT(value: number): void;
}
//# sourceMappingURL=lightservice.d.ts.map