NEWS
Hilfe bei Skript
Hilfe bei Skript
JavaScript
21
Posts
3
Posters
1.2k
Views
2
Watching
-
@Dominik-F sagte:
Doch, genau das wird es
Dann anders.
const logging = true; const id_Power_Poolpumpe = 'hm-rpc.0.OEQ0572933.2.POWER'/*Steckdose Poolpumpe Garage Messwert POWER*/; const id_Poolpumpe = 'hm-rpc.0.OEQ0572933.1.STATE'/*Steckdose Poolpumpe Garage STATE*/; var timer = null; on(id_Power_Poolpumpe, function (dp) { if (dp.state.val < 500) { if (dp.oldState.val >= 500) { timer = setTimeout(function () { if(getState(id_Poolpumpe).val) { setState(id_Poolpumpe, false); if (logging) log('Poolpumpe ausgeschaltet - Poolpumpe überprüfen'); } }, 10000); } } else if (timer) clearTimeout(timer); });Vielen Dank, ich werde es morgen testen