2018-07-01 21:48:20 +02:00
|
|
|
|
|
|
|
|
rule "Przedpokój: przełącz światło"
|
|
|
|
|
when
|
|
|
|
|
/* If there is no action the button returns 0. When you touch it it shows a state of 1 . */
|
|
|
|
|
Item sSONOFF06KEY received update ON or
|
|
|
|
|
Item sD1MINI06KEY received update
|
|
|
|
|
then
|
|
|
|
|
if (sSONOFF06.state == ON) {
|
|
|
|
|
sSONOFF06.sendCommand(OFF)
|
|
|
|
|
} else {
|
|
|
|
|
sSONOFF06.sendCommand(ON)
|
|
|
|
|
}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* podswietlenie bedzie caly czas ON, ustawione jako dioda statusu */
|
|
|
|
|
/*rule "Przedpokój: synchronizuj podświetlenia przycisków"
|
|
|
|
|
when
|
|
|
|
|
Item sSONOFF06 received update
|
|
|
|
|
then
|
|
|
|
|
if (sSONOFF06.state == ON) {
|
|
|
|
|
sSONOFF06LED.sendCommand(OFF)
|
|
|
|
|
sD1MINI03_light_red.sendCommand(OFF)
|
|
|
|
|
} else {
|
|
|
|
|
sSONOFF06LED.sendCommand(ON)
|
|
|
|
|
sD1MINI03_light_red.sendCommand(ON)
|
|
|
|
|
}
|
|
|
|
|
end*/
|
|
|
|
|
|
|
|
|
|
|
2018-07-18 14:19:08 +02:00
|
|
|
rule "Przedpokój: podświetlaj przy drzwiach po ciemku"
|
|
|
|
|
when
|
|
|
|
|
Item sSONOFF06 received update
|
|
|
|
|
then
|
|
|
|
|
if (sSONOFF06.state == ON) {
|
|
|
|
|
sSONOFF06LEDtouch.sendCommand(OFF)
|
|
|
|
|
} else {
|
|
|
|
|
sSONOFF06LEDtouch.sendCommand(ON)
|
|
|
|
|
}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
2018-07-01 21:48:20 +02:00
|
|
|
rule "Przedpokój: zapal rano"
|
|
|
|
|
when
|
2023-05-15 11:22:23 +02:00
|
|
|
Time cron "0 44 5 ? * MON-FRI *" /* była piąta */
|
2022-05-05 17:24:05 +02:00
|
|
|
/* Time cron "0 33 6 ? * MON-FRI *" */
|
2018-07-01 21:48:20 +02:00
|
|
|
then
|
2024-09-24 18:22:07 +02:00
|
|
|
if (sHolidayVacancy.state != ON) {
|
|
|
|
|
sSONOFF06.sendCommand(ON)
|
|
|
|
|
}
|
2018-07-01 21:48:20 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
rule "Przedpokój: zgaś rano"
|
|
|
|
|
when
|
2021-10-03 14:38:16 +02:00
|
|
|
/*Time cron "0 50 6 ? * MON-FRI *"*/
|
|
|
|
|
Time cron "0 50 7 ? * MON-FRI *"
|
2018-07-01 21:48:20 +02:00
|
|
|
then
|
|
|
|
|
sSONOFF06.sendCommand(OFF)
|
|
|
|
|
end
|
|
|
|
|
|
2020-12-26 21:54:22 +01:00
|
|
|
|
2021-02-04 20:40:19 +01:00
|
|
|
/* jak się urwie od internetu przyciskowi, zsynchronizuj stan światła na OFF */
|
|
|
|
|
/*rule "Przedpokój: synchronizuj stan jak włącznik się rozłączy z siecią"
|
|
|
|
|
when
|
|
|
|
|
Item rSONOFF06 received update OFF
|
|
|
|
|
then
|
|
|
|
|
sSONOFF06.postUpdate(OFF)
|
|
|
|
|
end
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2021-10-03 14:38:16 +02:00
|
|
|
/* special smart: 3x szybkie przełączenie zapala wszystko w domu;
|
|
|
|
|
if last przelaczenie time < 1 sekunde temu, licznik++
|
|
|
|
|
else licznik = 1
|
|
|
|
|
if licznik = 3, zapal wszystko
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|