Hello,
i have more than one prerequisite in a rule, I do not know how to solve this, I have tried some things but I can not get out, can someone help me?
the next condition must come in,
((Input5_3.state == ON) && (Input6_1.state == ON))
this is the rule
rule “VoiceControl-3”
when
Item VoiceCommand received command
then
if ((Input5_3.state == ON) && (Input6_1.state == ON))
val txt = VoiceCommand.toString.toLowerCase
logInfo(“Voice.Rec”,"VoiceCommand received "+txt)
if(txt.contains(“is deur op slot”))
sendNotification (“xxxxxxx@mail.nl”, “Deur is op slot”)
end
Please use code fences next time, that should help.
Furthermore you should check your quotation marks, I noticed the text in your post used some curly marks instead of the normal ones. Lastly, you should use accolades with your if-statements.
Other than that, your code seems fine.
rule “VoiceControl-3”
when
Item VoiceCommand received command
then
if (Input5_3.state == ON && Input6_1.state == ON){
val txt = VoiceCommand.toString.toLowerCase
logInfo("Voice.Rec", "VoiceCommand received "+txt)
if(txt.contains("is deur op slot")){
sendNotification (“xxxxxxx@mail.nl”, “Deur is op slot”)
}
}
end