refactor mqtt client

This commit is contained in:
ari committed 2025-11-14 11:44:57 -05:00
1 parent 44c999437b
commit 5f18fd6315
17 files changed
+1987 -851

No files matched your search

+11 -7
View File
@@ -20,17 +20,21 @@ type FlicHubOptions = {
uniqueId: string;
debug: boolean;
};
type MQTTOpt = {
host: string;
type MQTTOptions = {
port: number;
client_id: string;
keep_alive: boolean;
client_id: string | number[];
keep_alive: number | boolean;
clean_session: boolean;
username: string;
password: string;
username?: string;
password?: string;
protocol_name: string;
protocol_level: number;
};
type Flic2HassMQTTOptions = MQTTOptions & {
host: string;
};
type Options = {
mqtt: Partial<MQTTOpt> & { host: string };
mqtt: Partial<Flic2HassMQTTOptions> & { host: string };
debug?: boolean;
ha?: Partial<HAmqttOptions>;
flicBtns?: Partial<ButtonControllerOpt> & { disabled?: boolean };