From 41e7396205e51ebedf1c8c439c4c8758ae963f3f Mon Sep 17 00:00:00 2001 From: Tomasz Torcz Date: Tue, 24 Sep 2024 18:22:07 +0200 Subject: [PATCH] aktualizacje --- rules/przedpokój.rules | 5 +++-- rules/salon.cottonballs.rules | 3 +-- rules/sypialnia.lampka-nocna.rules | 19 +++++++++++++++---- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/rules/przedpokój.rules b/rules/przedpokój.rules index bbfdeea..80d785e 100644 --- a/rules/przedpokój.rules +++ b/rules/przedpokój.rules @@ -45,8 +45,9 @@ when Time cron "0 44 5 ? * MON-FRI *" /* była piąta */ /* Time cron "0 33 6 ? * MON-FRI *" */ then -/* wyłączać na urlopie */ - sSONOFF06.sendCommand(ON) + if (sHolidayVacancy.state != ON) { + sSONOFF06.sendCommand(ON) + } end rule "Przedpokój: zgaś rano" diff --git a/rules/salon.cottonballs.rules b/rules/salon.cottonballs.rules index 8dcf1b3..4c8ed97 100644 --- a/rules/salon.cottonballs.rules +++ b/rules/salon.cottonballs.rules @@ -37,14 +37,13 @@ end /* niech czeka na "goodnight" */ /* -rule "Zgaś cottonballsy wieczorem" +rule "Zgaś cottonballsy i balkon wieczorem" when Time cron "0 20 22 * * ?" then sOWFS01.sendCommand(OFF) sOWFS01_expected.postUpdate(OFF) - /* balkon */ sSHELLY01.sendCommand(OFF) end */ diff --git a/rules/sypialnia.lampka-nocna.rules b/rules/sypialnia.lampka-nocna.rules index 878a87f..b2977f7 100644 --- a/rules/sypialnia.lampka-nocna.rules +++ b/rules/sypialnia.lampka-nocna.rules @@ -4,17 +4,28 @@ rule "Zapal lampkę i cottonballs rano" when Time cron "0 43 5 ? * MON-FRI *" /* Time cron "0 33 6 ? * MON-FRI *" */ +/* Time cron "0 59 8 ? * MON-FRI *" */ then -/* wyłączać na urlopie */ - sOWFS02.sendCommand(ON) - sSONOFF08a.sendCommand(ON) + if (sHolidayVacancy.state != ON) { + sOWFS02.sendCommand(ON) + sSONOFF08a.sendCommand(ON) + } end +/* +rule "Zapal lampkę WFH" +when + Time cron "0 29 7 ? * FRI *" +then + sOWFS02.sendCommand(ON) +end +*/ + rule "Zgaś lampkę i cottonballs rano" when /* Time cron "0 30 6 * * ?" */ - Time cron "0 00 7 * * ?" + Time cron "0 10 7 * * ?" then sOWFS02.sendCommand(OFF) sSONOFF08a.sendCommand(OFF)