Skip to content

Commit 06c54db

Browse files
script0803SimplaHome
authored andcommitted
fix: Adjust the reporting frequency threshold of some Bituo devices (Koenkk#9537)
1 parent 814e05e commit 06c54db

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/devices/tuya.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11426,7 +11426,7 @@ export const definitions: DefinitionWithExtend[] = [
1142611426
e.ac_frequency(),
1142711427
e
1142811428
.numeric("data_report_duration", ea.SET)
11429-
.withValueMin(5)
11429+
.withValueMin(30)
1143011430
.withValueMax(3600)
1143111431
.withDescription(
1143211432
"WARNING: You must update device firmware to V3.1.3 before changing this setting! Use Tuya gateway/app to update firmware. Data report duration set (Threshold value range 5~3600 seconds)",
@@ -11444,7 +11444,7 @@ export const definitions: DefinitionWithExtend[] = [
1144411444
"data_report_duration",
1144511445
{
1144611446
to: (v: number) => {
11447-
const value = Math.max(5, Math.min(3600, Math.round(v)));
11447+
const value = Math.max(30, Math.min(3600, Math.round(v)));
1144811448
const byte1 = (value >> 8) & 0xff;
1144911449
const byte2 = value & 0xff;
1145011450
return [
@@ -11644,7 +11644,7 @@ export const definitions: DefinitionWithExtend[] = [
1164411644
e.ac_frequency(),
1164511645
e
1164611646
.numeric("data_report_duration", ea.SET)
11647-
.withValueMin(5)
11647+
.withValueMin(30)
1164811648
.withValueMax(3600)
1164911649
.withDescription(
1165011650
"WARNING: You must update device firmware to V3.2.2 before changing this setting! Use Tuya gateway/app to update firmware. Data report duration set (Threshold value range 5~3600 seconds)",
@@ -11658,7 +11658,7 @@ export const definitions: DefinitionWithExtend[] = [
1165811658
"data_report_duration",
1165911659
{
1166011660
to: (v: number) => {
11661-
const value = Math.max(5, Math.min(3600, Math.round(v)));
11661+
const value = Math.max(30, Math.min(3600, Math.round(v)));
1166211662
const byte1 = (value >> 8) & 0xff;
1166311663
const byte2 = value & 0xff;
1166411664
return [
@@ -11725,7 +11725,7 @@ export const definitions: DefinitionWithExtend[] = [
1172511725
e.power_factor().withUnit("%").withDescription("Total power factor"),
1172611726
e.power(),
1172711727
e.ac_frequency(),
11728-
e.numeric("data_report_duration", ea.SET).withValueMin(5).withValueMax(3600),
11728+
e.numeric("data_report_duration", ea.SET).withValueMin(30).withValueMax(3600),
1172911729
],
1173011730
meta: {
1173111731
tuyaDatapoints: [
@@ -11735,7 +11735,7 @@ export const definitions: DefinitionWithExtend[] = [
1173511735
"data_report_duration",
1173611736
{
1173711737
to: (v: number) => {
11738-
const value = Math.max(5, Math.min(3600, Math.round(v)));
11738+
const value = Math.max(30, Math.min(3600, Math.round(v)));
1173911739
const byte1 = (value >> 8) & 0xff;
1174011740
const byte2 = value & 0xff;
1174111741
return [
@@ -11830,7 +11830,7 @@ export const definitions: DefinitionWithExtend[] = [
1183011830
.numeric("update_frequency", ea.STATE_SET)
1183111831
.withUnit("s")
1183211832
.withDescription("Update frequency")
11833-
.withValueMin(5)
11833+
.withValueMin(30)
1183411834
.withValueMax(3600)
1183511835
.withPreset("default", 10, "Default value"),
1183611836
],
@@ -11961,7 +11961,7 @@ export const definitions: DefinitionWithExtend[] = [
1196111961
.numeric("update_frequency", ea.STATE_SET)
1196211962
.withUnit("s")
1196311963
.withDescription("Update frequency")
11964-
.withValueMin(5)
11964+
.withValueMin(30)
1196511965
.withValueMax(3600)
1196611966
.withPreset("default", 10, "Default value"),
1196711967
],
@@ -12024,7 +12024,7 @@ export const definitions: DefinitionWithExtend[] = [
1202412024
.numeric("update_frequency", ea.STATE_SET)
1202512025
.withUnit("s")
1202612026
.withDescription("Update frequency")
12027-
.withValueMin(5)
12027+
.withValueMin(30)
1202812028
.withValueMax(3600)
1202912029
.withPreset("default", 10, "Default value"),
1203012030
],

0 commit comments

Comments
 (0)