On a fan like DR-HAF003S, the plugin (git head) crashes HomeBridge on startup:
[10/10/2023, 7:33:04 PM] TypeError: Cannot read properties of undefined (reading 'state')
at new FanAccessory (/homebridge/node_modules/homebridge-dreo/src/FanAccessory.ts:76:48)
at DreoPlatform.discoverDevices (/homebridge/node_modules/homebridge-dreo/src/platform.ts:131:9)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
This is because the plugin tries to read the shakehorizon key, even when only hoscon exists.
On a fan like DR-HAF003S, the plugin (git head) crashes HomeBridge on startup:
This is because the plugin tries to read the
shakehorizon
key, even when onlyhoscon
exists.This fix ensures we only read one or the other.