Allow empty Thingsplex credentials (#3)

This commit is contained in:
Adrian Jagielak
2025-09-24 21:15:54 +02:00
parent a8e5b00275
commit 351274f56e
29 changed files with 83 additions and 5 deletions

View File

@@ -208,6 +208,7 @@ export function haPublishDevice(parameters: {
deviceInclusionReport: InclusionReport | undefined;
thingsplexUsername: string;
thingsplexPassword: string;
thingsplexAllowEmpty: boolean;
}): { commandHandlers: CommandHandlers } {
const components: { [key: string]: HaMqttComponent } = {};
const handlers: CommandHandlers = {};
@@ -261,8 +262,8 @@ export function haPublishDevice(parameters: {
}
if (
parameters.thingsplexUsername &&
parameters.thingsplexPassword &&
(parameters.thingsplexAllowEmpty ||
(parameters.thingsplexUsername && parameters.thingsplexPassword)) &&
parameters.vinculumDeviceData.fimp?.address &&
parameters.vinculumDeviceData.fimp?.adapter
) {