How i can set a rule that send me a message at 0:00 and tell me the state of a particular item?
This is my rule that tell me if there is a change of state:
rule "It_C_CondSplitSalone"
when
Item It_C_CondSplitSalone changed
then
val telegramAction = getActions("telegram","telegram:telegramBot:bot1")
if(It_C_CondSplitSalone.state==ON){
telegramAction.sendTelegram(" Attenzione il Magnetotermico Split Salone del Quadro GENERALE e SCATTATO")
} else {
telegramAction.sendTelegram("Il Magnetotermico Split Salone del Quadro GENERALE e stato RIPRISTINATO")
}
end
Read the documentation, ask a specific question if something in the documentation is unclear.
Would be quicker to Google the correct link than asking this question and waiting for an answer, or?
rule "It_I_IrrigazONOFF"
when
Time is midnight
else
Item (It_I_IrrigazONOFF.state==ON
then
val telegramAction = getActions("telegram","telegram:telegramBot:bot1")
telegramAction.sendTelegram("Irrigazione Disabilitata")
sendBroadcastNotification("Irrigazione disabilitata")
end
rule "It_I_IrrigazONOFF"
when
Time is midnight
if
Item (It_I_IrrigazONOFF.state==ON){
val telegramAction = getActions("telegram","telegram:telegramBot:bot1")
telegramAction.sendTelegram("Irrigazione Disabilitata")
sendBroadcastNotification("Irrigazione disabilitata")}
end
rule “Irrigazione off”
when
Time cron “0 0,56 0,23 * * ?”
then
val telegramAction = getActions(“telegram”,“telegram:telegramBot:bot1”)
if(It_O_BloccoIrrigazione .state==OFF){
telegramAction.sendTelegram(“Ti volevo avvisare che l’irrigazione è disattivata”)
}
end