+BWNU (0.8.43)
Code: Select all
e
.numeric("fading_time", ea.STATE_SET)
.withValueMin(0)
.withValueMax(28800)
.withValueStep(1)
.withUnit("s")
.withDescription("Motion keep time"),
e.binary("indicator", ea.STATE_SET, "ON", "OFF").withDescription("LED indicator mode"),
e
.numeric("illuminance_interval", ea.STATE_SET)
.withValueMin(1)
.withValueMax(720)
.withValueStep(1)
.withUnit("minutes")
.withDescription("Light sensing sampling(refresh and update only while active)"),
e
.numeric("motion_detection_sensitivity", ea.STATE_SET)
.withValueMin(0)
.withValueMax(19)
.withValueStep(1)
.withUnit("x")
.withDescription("The larger the value, the more sensitive it is (refresh and update only while active)"),
],
meta: {
tuyaDatapoints: [
[1, "presence", tuya.valueConverter.trueFalse1],
[106, "illuminance", tuya.valueConverter.raw],
[102, "fading_time", tuya.valueConverter.raw],
[2, "motion_detection_sensitivity", tuya.valueConverter.raw],
[108, "indicator", tuya.valueConverter.onOff],
[110, "battery", tuya.valueConverter.raw],
[111, "temperature", tuya.valueConverter.divideBy10],
[101, "humidity", tuya.valueConverter.raw],
[109, "temperature_unit", tuya.valueConverter.temperatureUnit],
[105, "temperature_calibration", tuya.valueConverter.divideBy10],
[104, "humidity_calibration", tuya.valueConverter.raw],
[107, "illuminance_interval", tuya.valueConverter.raw],
+BWNU (0.8.43)
Code: Select all
e
.numeric("sensitivity", ea.STATE_SET)
.withValueMin(0)
.withValueMax(9)
.withValueStep(1)
.withUnit("x")
.withDescription("The larger the value, the more sensitive it is (refresh and update only while active)"),
e
.numeric("illuminance_sampling", ea.STATE_SET)
.withValueMin(1)
.withValueMax(480)
.withValueStep(1)
.withUnit("minutes")
.withDescription("Brightness acquisition interval (refresh and update only while active)"),
e.battery(),
],
meta: {
tuyaDatapoints: [
[
1,
"rainwater",
tuya.valueConverterBasic.lookup({
none: tuya.enum(0),
raining: tuya.enum(1),
}),
],
[102, "illuminance", tuya.valueConverter.raw],
[104, "battery", tuya.valueConverter.raw],
[2, "sensitivity", tuya.valueConverter.raw],
[101, "illuminance_sampling", tuya.valueConverter.raw],