Skip to content

Commit

Permalink
Develco MOSZB-140: adjusted min occupancy_timeout
Browse files Browse the repository at this point in the history
Forcing minimum value to 20 was not the right value.
Default value (by manufacturer value) is 12 but after a test it can be lowered to 5.
  • Loading branch information
emandtf authored Dec 7, 2023
1 parent ddf7dcf commit 94d64cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/devices/develco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ const develco = {
key: ['occupancy_timeout'],
convertSet: async (entity, key, value, meta) => {
let timeoutValue = utils.toNumber(value, 'occupancy_timeout');
if (timeoutValue < 20) {
meta.logger.warn(`Minimum occupancy_timeout is 20, using 20 instead of ${timeoutValue}!`);
timeoutValue = 20;
if (timeoutValue < 5) {
meta.logger.warn(`Minimum occupancy_timeout is 5, using 5 instead of ${timeoutValue}!`);
timeoutValue = 5;
}
await entity.write('ssIasZone', {'develcoAlarmOffDelay': timeoutValue}, manufacturerOptions);
return {state: {occupancy_timeout: timeoutValue}};
Expand Down Expand Up @@ -655,7 +655,7 @@ const definitions: Definition[] = [
dynExposes.push(e.occupancy());
if (device && device.softwareBuildID && Number(device.softwareBuildID.split('.')[0]) >= 3) {
dynExposes.push(e.numeric('occupancy_timeout', ea.ALL).withUnit('s').
withValueMin(20).withValueMax(65535));
withValueMin(5).withValueMax(65535));
}
dynExposes.push(e.temperature());
dynExposes.push(e.illuminance_lux());
Expand Down

0 comments on commit 94d64cb

Please sign in to comment.