Add more delays when initializing demo mode

This commit is contained in:
Adrian Jagielak
2025-07-28 16:16:19 +02:00
parent d43414c90d
commit d131297f2a
2 changed files with 7 additions and 0 deletions

View File

@@ -85,6 +85,7 @@ import { pollVinculum } from './fimp/vinculum';
if (demoMode) {
log.debug('Resetting all devices for demo mode');
ha?.publish(haDevice.topic, '', { retain: true, qos: 2 });
await delay(50);
continue;
}
@@ -122,6 +123,11 @@ import { pollVinculum } from './fimp/vinculum';
}
}
if (demoMode) {
// Wait for the devices to be fully removed from Home Assistant
await delay(1000);
}
const vinculumDevicesToHa = async (devices: FimpResponse) => {
const commandHandlers: CommandHandlers = {};
for (const device of devices.val.param.device) {