diff --git a/lib/devices/gateway.js b/lib/devices/gateway.js index 811c519..671fce2 100644 --- a/lib/devices/gateway.js +++ b/lib/devices/gateway.js @@ -140,7 +140,12 @@ const Gateway = Thing.type(Parent => class Gateway extends Parent.with(MiioApi, return id; } - return this.call('get_device_prop', [ 'lumi.0', 'device_list' ]) + let listCommand = 'device_list'; + if(id.includes('mgl03')) { + listCommand = 'get_device_list'; + } + + return this.call('get_device_prop', [ 'lumi.0', listCommand ]) .then(list => { const defs = [ ...this.extraChildren ]; for(let i=0; i