Skip to content

Commit 40215b6

Browse files
authored
[shelly] Improve smoke sensor wake-up period handling (openhab#18309)
* [shelly] increase smoke sensor regular update period by half an hour (openhab#17767) Signed-off-by: Matthias Maier <[email protected]>
1 parent b4967bf commit 40215b6

File tree

1 file changed

+5
-1
lines changed
  • bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/handler

1 file changed

+5
-1
lines changed

bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/handler/ShellyBaseHandler.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,11 @@ thingName, getThing().getLabel(), thingType, config.deviceAddress.toUpperCase(),
356356
tmpPrf.updatePeriod = "m".equalsIgnoreCase(getString(tmpPrf.settings.sleepMode.unit))
357357
? tmpPrf.settings.sleepMode.period * 60 // minutes
358358
: tmpPrf.settings.sleepMode.period * 3600; // hours
359-
tmpPrf.updatePeriod += 60; // give 1min extra
359+
if (tmpPrf.isSmoke) {
360+
tmpPrf.updatePeriod += 1800; // for smoke sensor give 30min extra
361+
} else {
362+
tmpPrf.updatePeriod += 60; // give 1min extra
363+
}
360364
} else if (tmpPrf.settings.coiot != null && tmpPrf.settings.coiot.updatePeriod != null) {
361365
// Derive from CoAP update interval, usually 2*15+10s=40sec -> 70sec
362366
tmpPrf.updatePeriod = Math.max(UPDATE_SETTINGS_INTERVAL_SECONDS,

0 commit comments

Comments
 (0)