Skip to content

Commit

Permalink
Fix PAYLOAD_DICT for 0D CONTROL & 3.4 DP_QUERY_NEW
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Albu committed Apr 10, 2023
1 parent 5b9e513 commit dcbcad5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions custom_components/localtuya/pytuya/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,18 @@ class DecodeError(Exception):
DEV_TYPE_0D: {
DP_QUERY: { # Get Data Points from Device
COMMAND_OVERRIDE: CONTROL_NEW, # Uses CONTROL_NEW command for some reason
COMMAND: {PARAMETER_DEV_ID: "", PARAMETER_UID: "", PARAMETER_T: ""},
COMMAND: {PARAMETER_DEV_ID: "", PARAMETER_UID: "", PARAMETER_T: "", PARAMETER_CID: ""},
},
DP_QUERY_NEW: {
COMMAND: {PARAMETER_CID: ""},
},
HEART_BEAT: {
COMMAND: {}
},
CONTROL: {
COMMAND_OVERRIDE: CONTROL_NEW,
COMMAND: {PARAMETER_CID: "", "ctype": 0},
},
CONTROL_NEW: {
COMMAND: {PARAMETER_CID: "", "ctype": 0},
},
Expand All @@ -266,7 +270,7 @@ class DecodeError(Exception):
COMMAND: {PARAMETER_GW_ID: "", PARAMETER_DEV_ID: "", PARAMETER_UID: "" },
},
DP_QUERY_NEW: {
COMMAND: {PARAMETER_DEV_ID: "", PARAMETER_UID: "", PARAMETER_T: ""}
COMMAND: {PARAMETER_DEV_ID: "", PARAMETER_UID: "", PARAMETER_T: "", PARAMETER_CID: ""}
},
HEART_BEAT: {
COMMAND: {PARAMETER_GW_ID: "", PARAMETER_DEV_ID: ""}
Expand Down

0 comments on commit dcbcad5

Please sign in to comment.