Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for new cover motor model #5738

Merged
merged 4 commits into from
May 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions devices/tuya.js
Original file line number Diff line number Diff line change
Expand Up @@ -2572,6 +2572,41 @@ module.exports = [
toZigbee: [tz.tuya_cover_control],
exposes: [e.cover_position().setAccess('position', ea.STATE_SET)],
},
{
fingerprint: [
{modelID: 'TS0601', manufacturerName: '_TZE200_cpbo62rn'},
],
model: 'TS0601_cover_6',
vendor: 'TuYa',
description: 'Cover motor',
fromZigbee: [tuya.fz.datapoints],
toZigbee: [tuya.tz.datapoints],
exposes: [
exposes.text('work_state', ea.STATE),
e.cover_position().setAccess('position', ea.STATE_SET),
e.battery(),
exposes.enum('opening_mode', ea.STATE_SET, ['tilt', 'lift']).withDescription('Opening mode'),
exposes.enum('motor_direction', ea.STATE_SET, ['left', 'right']).withDescription('Motor side'),
exposes.enum('set_upper_limit', ea.STATE_SET, ['start', 'stop']).withDescription('Learning'),
exposes.enum('factory_reset', ea.STATE_SET, ['SET']).withDescription('Remove limits'),
],
whiteLabel: [
tuya.whitelabel('TuYa', 'LY-108', 'Cover', ['_TZE200_cpbo62rn']),
],
meta: {
tuyaDatapoints: [
[1, 'state', tuya.valueConverterBasic.lookup({'OPEN': tuya.enum(0), 'STOP': tuya.enum(1), 'CLOSE': tuya.enum(2)})],
[2, 'position', tuya.valueConverter.coverPosition],
[3, 'position', tuya.valueConverter.raw],
[4, 'opening_mode', tuya.valueConverterBasic.lookup({'tilt': tuya.enum(0), 'lift': tuya.enum(1)})],
[7, 'work_state', tuya.valueConverterBasic.lookup({'standby': tuya.enum(0), 'success': tuya.enum(1), 'learning': tuya.enum(2)})],
[13, 'battery', tuya.valueConverter.raw],
[101, 'motor_direction', tuya.valueConverterBasic.lookup({'left': tuya.enum(0), 'right': tuya.enum(1)})],
[102, 'set_upper_limit', tuya.valueConverterBasic.lookup({'start': tuya.enum(1), 'stop': tuya.enum(0)})],
[107, 'factory_reset', tuya.valueConverter.setLimit],
],
},
},
{
zigbeeModel: ['kud7u2l'],
fingerprint: [
Expand Down