Skip to content

Commit

Permalink
fix: Action command 2 for Tuya-based device (#987)
Browse files Browse the repository at this point in the history
* tuyaAction2 command

* Update events.ts

* Update events.ts
  • Loading branch information
kirovilya authored and Koenkk committed Mar 20, 2024
1 parent 126e926 commit 4135128
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controller/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ const CommandsLookup: {[s: string]: MessagePayloadType} = {

// Tuya
'tuyaAction': 'commandTuyaAction',
'tuyaAction2': 'commandTuyaAction2',
};

type MessagePayloadType =
Expand Down Expand Up @@ -174,7 +175,7 @@ type MessagePayloadType =
'commandZosungSendIRCode01' | 'commandZosungSendIRCode02'|'commandZosungSendIRCode04' | 'zosungSendIRCode03Resp' |
'zosungSendIRCode05Resp' | 'commandMcuGatewayConnectionStatus' | 'commandSchneiderWiserThermostatBoost' |
'transferDataResp' | 'commandAction1' | 'commandAction2' | 'commandAction3' | 'commandAction4' | 'commandAction6' |
'commandTuyaAction';
'commandTuyaAction' | 'commandTuyaAction2';

interface MessagePayload {
type: MessagePayloadType;
Expand Down
6 changes: 6 additions & 0 deletions src/zcl/definition/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,12 @@ const Cluster: {
{name: 'value', type: DataType.uint8},
],
},
tuyaAction2: {
ID: 0xFC,
parameters: [
{name: 'value', type: DataType.uint8},
],
},
},
commandsResponse: {
},
Expand Down

0 comments on commit 4135128

Please sign in to comment.