peter-murray / node-hue-api

Node.js Library for interacting with the Philips Hue Bridge and Lights
Apache License 2.0
1.18k stars 145 forks source link

Failed to resolve a sensor class for type: ZLLLightLevel #146

Closed simon-lorenz closed 4 years ago

simon-lorenz commented 4 years ago

I've run into an issue calling api.sensors.getAll():

ApiError: Failed to resolve a sensor class for type: ZLLLightLevel
    at Object.buildSensor [as build] ([...]/node_modules/node-hue-api/lib/bridge-model/devices/sensors/index.js:32:11)
    at [...]/node_modules/node-hue-api/lib/api/http/endpoints/sensors.js:107:33

The light sensor of my Hue Motion Sensor has the type "ZLLLightLevel", which this line tries to require, but the correct filename would be "ZLLLightlevel".

peter-murray commented 4 years ago

Thanks, will issue the fix for this tomorrow.

I have been working on a complete change to the models and building of these objects in a future release.

peter-murray commented 4 years ago

I have released version 3.4.1 which has the fix for this in it.

Please let me know if all is well in that as I do not have a motion sensor to test against.

simon-lorenz commented 4 years ago

Thanks for the quick fix, it works now!