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
No known key found for this signature in database
GPG Key ID: 0818CF7AF6C62BFB
2 changed files with 7 additions and 0 deletions

View File

@ -8,6 +8,7 @@
- Fixed using the unit reported by the numerical sensor.
- Added restarting the add-on when disconnected from the hub or Home Assistant
- Updated demo mode data.
- Added more delays when initializing the demo mode.
## 0.1.7 (26.07.2025)

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) {