Hello. I have rule that sends the message in telegram
I have Xiaomi magnet sensor. When door is opened, openhab send message in telegram.
How can I do rule that send message at a specific time? from 18:00 to 9:00
My rule is
rule “Оповещения телеграм”
when
Item mihome_sensor_magnet*******_isOpen changed from CLOSED to OPEN
then
sendTelegram(“bot1”, “Откыта дверь в кабинете”)
end
I want to clarify
Do you want to send a message when the door is opened between 18:00 and 19:00
OR
Do you want to send a message between 18:00 and 19:00 even it the door has been opened previously?
rule "Оповещения телеграм"
when
Item mihome_sensor_magnetxxxxxxxx_isOpen changed from CLOSED to OPEN
then
if (now.getHourOfDay >= 9 && now.getHourOfDay < 18) {
sendTelegram("bot1", "Откыта дверь в кабинете")
}
end