Hi thank you, I have found that when I click into “generate_external_definition” in the extend line, the illuminance variaable is not found
extend: [m.iasZoneAlarm({"zoneType":"generic","zoneAttributes":["alarm_1","alarm_2","tamper","battery_low"]}), m.battery()],
But for example, the code on the sensor that works great is different:
extend: [m.iasZoneAlarm({"zoneType":"generic","zoneAttributes":["alarm_1","alarm_2","tamper","battery_low"]}), m.battery(), m.illuminance()],
The problem now is: If i go to z2m tuya code, i can verify that it has the illuminance datapoint:
fingerprint: tuya.fingerprint("TS0601", ["_TZE200_3towulqd", "_TZE200_1ibpyhdc", "_TZE200_bh3n6gk8", "_TZE200_ttcovulf", "_TZE200_gjldowol"]),
model: "ZG-204ZL",
vendor: "Tuya",
description: "Luminance motion sensor",
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
exposes: [
e.occupancy(),
e.illuminance().withUnit("lx"),
e.battery(),
e
.enum("sensitivity", ea.STATE_SET, ["low", "medium", "high"])
.withDescription("PIR sensor sensitivity (refresh and update only while active)"),
e
.enum("keep_time", ea.STATE_SET, ["10", "30", "60", "120"])
.withDescription("PIR keep time in seconds (refresh and update only while active)"),
e
.numeric("illuminance_interval", ea.STATE_SET)
.withValueMin(1)
.withValueMax(720)
.withValueStep(1)
.withUnit("minutes")
.withDescription("Brightness acquisition interval (refresh and update only while active)"),
],
meta: {
tuyaDatapoints: [
[1, "occupancy", tuya.valueConverter.trueFalse0],
[4, "battery", tuya.valueConverter.raw],
[
9,
"sensitivity",
tuya.valueConverterBasic.lookup({
low: tuya.enum(0),
medium: tuya.enum(1),
high: tuya.enum(2),
}),
],
[
10,
"keep_time",
tuya.valueConverterBasic.lookup({
"10": tuya.enum(0),
"30": tuya.enum(1),
"60": tuya.enum(2),
"120": tuya.enum(3),
}),
],
[12, "illuminance", tuya.valueConverter.raw],
[102, "illuminance_interval", tuya.valueConverter.raw],
],
},
},