diff --git a/futurehome/CHANGELOG.md b/futurehome/CHANGELOG.md index fbc16e1..9fb6349 100644 --- a/futurehome/CHANGELOG.md +++ b/futurehome/CHANGELOG.md @@ -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) diff --git a/futurehome/src/index.ts b/futurehome/src/index.ts index 4afd9ce..75d1c87 100644 --- a/futurehome/src/index.ts +++ b/futurehome/src/index.ts @@ -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) {