YinHangCode / homebridge-mi-airpurifier

XiaoMi air purifier plugins for HomeBridge.
115 stars 34 forks source link

typeError after update miio #7

Open choibyeoli opened 6 years ago

choibyeoli commented 6 years ago

After 'miio' updated, it's not work with follwoing message.

TypeError: miio.Device is not a constructor I solved this error But I have another error TypeError: that.device.call is not a function Please solve it

YinHangCode commented 6 years ago

You can use 'npm install -g miio@0.14.1' temporarily, then I'll think about a solution.

aholstenson commented 6 years ago

@YinHangCode The best way would be to set miio under dependencies in package.json and lock it to the version you need. That way installing your plugin will automatically install the version of miio needed. 0.15.x will probably not be the last release to change APIs before miio reaches 1.0.0.

YinHangCode commented 6 years ago

@aholstenson that's a good idea, thank you very much.