|
|
|
@ -358,6 +358,9 @@ void setup() {
|
|
|
|
|
#ifdef dataTCS34725_lux_minchange
|
|
|
|
|
dataTCS34725_lux.minchange=dataTCS34725_lux_minchange;
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef dataTCS34725_lux_senddelaymax
|
|
|
|
|
dataTCS34725_lux.senddelaymax=dataTCS34725_lux_senddelaymax;
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef dataTCS34725_colortemp_minchange
|
|
|
|
|
dataTCS34725_colortemp.minchange=dataTCS34725_colortemp_minchange;
|
|
|
|
|
#endif
|
|
|
|
@ -912,9 +915,13 @@ void loop_TCS34725_colortemp()
|
|
|
|
|
|
|
|
|
|
Homie.getLogger() << "colortemp tcs " << ": " << value_colortemp << endl;
|
|
|
|
|
if (tcs.lux>=TCS34725_MINLUXFORCT) {
|
|
|
|
|
sensorNode.setProperty("colortemp").send(String(value_colortemp));
|
|
|
|
|
if (value_colortemp > 1) {
|
|
|
|
|
sensorNode.setProperty("colortemp").send(String(value_colortemp));
|
|
|
|
|
}else{
|
|
|
|
|
Homie.getLogger() << "didn't send tcs ct because value is too low" << endl;
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
Homie.getLogger() << "didn't send tcs because light too low: " << tcs.lux << "lux" << endl;
|
|
|
|
|
Homie.getLogger() << "didn't send tcs ct because light too low: " << tcs.lux << "lux" << endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
d.lastsentvalue=value_colortemp;
|
|
|
|
|