UNPKG

homebridge-econet-rheem

Version:

Homebridge plugin based on pyeconet for control of Rheem water heaters

84 lines (83 loc) 1.99 kB
import { ThermostatOperationMode } from './constants'; export declare const SENSITIVE_KEYS: string[]; export type ValueOrObject<T> = T | { value: T; }; export declare function getValue<T>(input: ValueOrObject<T>): T; export type TokenData = { user_id: string; user_token: string; options: { account_id: string; }; }; export type StringValue = { value: string; }; export type NumberValue = { value: number; }; export type Setpoint = { constraints: SetpointConstraints; value: number; }; export type SetpointConstraints = { lowerLimit?: number; upperLimit?: number; units?: string; }; export type ModeConstraints = { enumText?: string[]; }; export type Mode = { constraints?: ModeConstraints; value?: ThermostatOperationMode; }; export type EquipmentData = { device_type?: string; device_name?: string; serial_number?: string; '@NAME'?: StringValue; '@ALERTCOUNT'?: number; '@SETPOINT'?: Setpoint; zoning_devices?: EquipmentData[]; }; export type LocationData = { equiptments: EquipmentData[]; }; export type LocationsResponse = { results: { locations: LocationData[]; }; }; export type ThermostatData = { '@HUMIDITY'?: NumberValue; '@SETPOINT'?: NumberValue; '@COOLSETPOINT'?: Setpoint; '@HEATSETPOINT'?: Setpoint; '@DEADBAND'?: NumberValue; '@MODE'?: Mode; '@RUNNINGSTATUS'?: string; }; export type WaterHeaterData = { '@RUNNING'?: string; '@ENABLED'?: NumberValue; '@SETPOINT'?: Setpoint; '@HOTWATER'?: string; }; export type MQTTData = { serial_number?: string; '@ALERTCOUNT'?: number; '@ENABLED'?: ValueOrObject<number>; '@SETPOINT'?: number; '@HOTWATER'?: string; '@RUNNING'?: string; '@RUNNINGSTATUS'?: string; '@HUMIDITY'?: number; '@COOLSETPOINT'?: number; '@HEATSETPOINT'?: number; '@MODE'?: NumberValue; }; export interface MQTTError extends Error { code?: string | number; }