Add a switch and link with a rule

Hello, I will add a switch in the basic ui for manual switching for a status e.g. at home or not at home.
I will set this manual, because the possibilities for home detection with mobile phone or others is not practical for me.

Depending on the switch status on or off should a rule running.
I have several door switches.

If the new created switch set to off, then the status should only be logged.
If the new created switch set to on, then the status should be logged and send a notification.

How can create this switch in the basic ui without a thing and how can I this linked with this rule?

Create an Item. Item’s don’t have to be linked to a Channel. Use it like any other Item in your Rules. You can create the Item from the Items menu in PaperUI or by adding it to a .items file.

Thanks. It works.

I test it with this rule.

rule “Alert”
Item Garagedoor_OpenClose changed to OPEN
if (Alarm.state == ON)