I have a LoRaWAN Door/Window sensor which I could successfully integrated into NR (on RPi) through TTN and MQTT. I have an LED and text on my dashboard which shows whether the door is open or close.
Now I want to add an alarm to it that when the door is open get an alarm on a buzzer connected to RPi. All good up to here, BUT I don't want this alarm be activated all time. I want to add a switch that when I go out, I click on that switch and activate the alarm.
Looks like there is no AND operation for doing this. I can't find a way to get these two inputs (switch and sensor value) and act accordingly. Any help would be appreciated.