Newbie...door notification code structure

I have 4 HRDS1 sensors. I have prowl notifications for each door opened or closed, so 8 scenes.

I was able to get that cut in half using the following one scene for opened or closed (event triggers: door opened or door closed):


local  Door1status= luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1", "Tripped", 28)

if (Door1status == "1")  then

luup.inet.wget("https://prowl.weks.net/publicapi/add?apikey=12345678&application=Vera&event=front_door&description=opened&priority=-1")

else luup.inet.wget("https://prowl.weks.net/publicapi/add?apikey=12345678&application=Vera&event=front_door&description=closed&priority=-1")

 
end

How can I do all 4 doors, opened or closed, with one scene? Newbie-friendly help, please! :wink:

Set up an event for each case.

Front door closed:
Events → Device: pick the the front door sensor → Trigger: An armed sensor is tripped → Tripped? No
Back to Events
Luup event:

luup.inet.wget("https://prowl.weks.net/publicapi/add?apikey=12345678&application=Vera&event=front_door&description=closed&priority=-1")

Front door opened:
Events → Device: pick the the front door sensor → Trigger: An armed sensor is tripped → Tripped? Yes
Back to Events
Luup event:

luup.inet.wget("https://prowl.weks.net/publicapi/add?apikey=12345678&application=Vera&event=front_door&description=opened&priority=-1")

Add additional events for other doors.

(Note: tested the above with Aeon sensor, not Hawking.)

Yep, that does it. I did not realize until recently that (1) you could have multiple OR triggers per scene, or that (2) you could assign a script to each trigger.

But, for future reference, how would a single nested if/then/else look to do something like this task?