homebridge-hilo
Version:
Plugin Homebridge (non officiel) pour la passerelle et les appareils Hilo de Hydro-Québec | Unofficial Homebridge plugin for Hydro-Québec Hilo bridge and devices
20 lines (16 loc) • 452 B
text/typescript
import { PlatformConfig } from "homebridge";
export type HiloConfig = PlatformConfig & {
noChallengeSensor: boolean;
plannedHours: number;
refreshToken: string;
};
const defaultConfig: Partial<HiloConfig> = {
noChallengeSensor: false,
plannedHours: 2,
refreshToken: "",
};
let _config: HiloConfig;
export const setConfig = (config: HiloConfig) => {
_config = { ...defaultConfig, ...config };
};
export const getConfig = () => _config;