Skip to content

Commit d55f9f1

Browse files
committed
Replace 65000 with repInterval.MAX
1 parent 1323555 commit d55f9f1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/devices/ikea.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ import {
4444
windowCovering,
4545
} from '../lib/modernExtend';
4646
import {DefinitionWithExtend} from '../lib/types';
47+
import {repInterval} from '../lib/constants';
48+
4749

4850
const definitions: DefinitionWithExtend[] = [
4951
// #region light
@@ -608,7 +610,7 @@ const definitions: DefinitionWithExtend[] = [
608610
// Enable reporting of powerDivisor, needs to change dynamically with the amount of power
609611
// For details, see: https://github.com/Koenkk/zigbee2mqtt/issues/23961#issuecomment-2366733453
610612
await endpoint.configureReporting('haElectricalMeasurement', [
611-
{attribute: 'acPowerDivisor', minimumReportInterval: 10, maximumReportInterval: 65000, reportableChange: 1},
613+
{attribute: 'acPowerDivisor', minimumReportInterval: 10, maximumReportInterval: repInterval.MAX, reportableChange: 1},
612614
]);
613615
},
614616
},
@@ -935,7 +937,7 @@ const definitions: DefinitionWithExtend[] = [
935937
const endpoint = device.getEndpoint(2);
936938
// This is required to prevent the device's reported state being stuck after it quickly changed back and forth
937939
await endpoint.configureReporting('ssIasZone', [
938-
{attribute: 'zoneStatus', minimumReportInterval: 0, maximumReportInterval: 65000, reportableChange: 0},
940+
{attribute: 'zoneStatus', minimumReportInterval: 0, maximumReportInterval: repInterval.MAX, reportableChange: 0},
939941
]);
940942
},
941943
},
@@ -956,7 +958,7 @@ const definitions: DefinitionWithExtend[] = [
956958
const endpoint = device.getEndpoint(1);
957959
// This is required to prevent the device's reported state being stuck after it quickly changed back and forth
958960
await endpoint.configureReporting('ssIasZone', [
959-
{attribute: 'zoneStatus', minimumReportInterval: 0, maximumReportInterval: 65000, reportableChange: 0},
961+
{attribute: 'zoneStatus', minimumReportInterval: 0, maximumReportInterval: repInterval.MAX, reportableChange: 0},
960962
]);
961963
},
962964
},

0 commit comments

Comments
 (0)