arachnetech / homebridge-mqttthing

A plugin for Homebridge allowing the integration of many different accessory types using MQTT.
Apache License 2.0
462 stars 104 forks source link

Ignoring invalid value - type: "lightSensor" #556

Open JustAnotherIssue opened 2 years ago

JustAnotherIssue commented 2 years ago

v1.4.1

Ignoring invalid value [0] for Current Ambient Light Level - below minimum (0.0001)

knobby888 commented 2 years ago

Also having this issue it causes the light sensor reading to to freeze when the sensor reads 0

[6/1/2022, 10:24:27 PM] [homebridge-mqttthing] This plugin generated a warning from the characteristic 'Current Ambient Light Level': characteristic was supplied illegal value: number 0 exceeded minimum of 0.0001. See https://homebridge.io/w/JtMGR for more info. [6/1/2022, 10:24:27 PM] [homebridge-mqttthing] Error: at CurrentAmbientLightLevel.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2142:105) at CurrentAmbientLightLevel.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2045:14) at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1617:24 at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:10:18 at handleGetStateCallback (/homebridge/node_modules/homebridge-mqttthing/index.js:282:21) at CurrentAmbientLightLevel. (/homebridge/node_modules/homebridge-mqttthing/index.js:1204:21) at CurrentAmbientLightLevel.emit (node:events:526:28) at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1592:14 at new Promise () at CurrentAmbientLightLevel. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1590:12) at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:144:27) at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:125:57) at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:118:75 at new Promise () at awaiter (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:114:16) at CurrentAmbientLightLevel.Characteristic.handleGetRequest (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Characteristic.js:689:38) at Bridge. (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1569:27) at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:144:27) at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:125:57) at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:118:75 at new Promise () at awaiter (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:114:16)

odelcourt commented 2 years ago

Hi, it could be nice to update the maximum value (actually 100k) to 150k as the new weather station goes beyond the 100k Lumens.

odelcourt commented 2 years ago
odelcourt commented 2 years ago
  • 120k seems more reasonable ;)

or not, I have seen more than 120k Lux this week at my home WS.