mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-31 13:34:22 +02:00
[shelly] Improve smoke sensor wake-up period handling (#18309)
* [shelly] increase smoke sensor regular update period by half an hour (#17767) Signed-off-by: Matthias Maier <code@telebim.de>
This commit is contained in:
+5
-1
@@ -356,7 +356,11 @@ public abstract class ShellyBaseHandler extends BaseThingHandler
|
||||
tmpPrf.updatePeriod = "m".equalsIgnoreCase(getString(tmpPrf.settings.sleepMode.unit))
|
||||
? tmpPrf.settings.sleepMode.period * 60 // minutes
|
||||
: tmpPrf.settings.sleepMode.period * 3600; // hours
|
||||
tmpPrf.updatePeriod += 60; // give 1min extra
|
||||
if (tmpPrf.isSmoke) {
|
||||
tmpPrf.updatePeriod += 1800; // for smoke sensor give 30min extra
|
||||
} else {
|
||||
tmpPrf.updatePeriod += 60; // give 1min extra
|
||||
}
|
||||
} else if (tmpPrf.settings.coiot != null && tmpPrf.settings.coiot.updatePeriod != null) {
|
||||
// Derive from CoAP update interval, usually 2*15+10s=40sec -> 70sec
|
||||
tmpPrf.updatePeriod = Math.max(UPDATE_SETTINGS_INTERVAL_SECONDS,
|
||||
|
||||
Reference in New Issue
Block a user