@tantchen/fritzapi
Version:
Home automation node API for Fritz!Box, Fritz!DECT and FRITZ!Powerline devices
47 lines (46 loc) • 1.38 kB
TypeScript
import { ColorName } from './const';
import { IState, ITemp } from './lib';
/**
* convert temp to api
* @param temp
*/
declare function temp2api(temp: unknown): number;
/**
* convert api to temp
* @param param
*/
declare function api2temp(param: string | number): ITemp;
/**
* time to api
* @param seconds
*/
declare function time2api(seconds: number): number;
/**
* state to api
* @param param
*/
declare function state2api(param: IState): number;
/**
* level to api
* @param param
* @param isPercent
*/
declare function level2api(param: number, isPercent: boolean): number;
declare function colortemp2api(param: number): 6500 | 5900 | 5300 | 4700 | 4200 | 3800 | 3400 | 3000 | 2700;
/**
* Fritz color schemes
* The fritzbox accepts only a limited range of hue/saturation combinations
* to set the color of a bulb. The hue value must be one of the 12 predefined
* values for the base colors and each of the hue values has its own set of
* three saturation values.
* Any attempt to use other hue/saturaion values fails silently.
* @param color
*/
declare function color2apihue(color: ColorName): number;
/**
* resolve satindex
* @param color
* @param satindex
*/
declare function satindex2apisat(color: ColorName, satindex: number): number;
export { temp2api, api2temp, time2api, state2api, level2api, colortemp2api, color2apihue, satindex2apisat, };