Skip to content

Commit 0f700a2

Browse files
committed
Update tuya.ts
Add support for Tuya TS130F _TZ3000_cet6ch1r, it supports different calibration times for up and down Signed-off-by: Jonathan Sciarrabba <[email protected]>
1 parent e71baeb commit 0f700a2

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/devices/tuya.ts

+14-3
Original file line numberDiff line numberDiff line change
@@ -2556,13 +2556,24 @@ const definitions: DefinitionWithExtend[] = [
25562556
tuya.whitelabel('Nous', 'B4Z', 'Curtain switch', ['_TZ3000_yruungrl']),
25572557
],
25582558
exposes: (device) => {
2559-
const exps = [
2559+
const exps: Expose[] = [
25602560
e.cover_position(),
25612561
e.enum('moving', ea.STATE, ['UP', 'STOP', 'DOWN']),
2562-
e.binary('calibration', ea.ALL, 'ON', 'OFF'),
25632562
e.binary('motor_reversal', ea.ALL, 'ON', 'OFF'),
2564-
e.numeric('calibration_time', ea.STATE).withUnit('s').withDescription('Calibration time'),
25652563
];
2564+
if (device?.manufacturerName !== '_TZ3000_cet6ch1r') {
2565+
exps.push(
2566+
e.binary('calibration', ea.ALL, 'ON', 'OFF'),
2567+
e.numeric('calibration_time', ea.STATE).withUnit('s').withDescription('Calibration time'),
2568+
);
2569+
} else {
2570+
exps.push(
2571+
e.binary('calibration_up', ea.ALL, 'ON', 'OFF'),
2572+
e.numeric('calibration_time_up', ea.STATE).withUnit('s').withDescription('Calibration time up'),
2573+
e.binary('calibration_down', ea.ALL, 'ON', 'OFF'),
2574+
e.numeric('calibration_time_down', ea.STATE).withUnit('s').withDescription('Calibration time down'),
2575+
);
2576+
}
25662577
if (device?.manufacturerName !== '_TZ3210_xbpt8ewc') {
25672578
exps.push(tuya.exposes.indicatorMode(), tuya.exposes.backlightModeOffOn());
25682579
}

0 commit comments

Comments
 (0)