Problems with virtual pins

Guys, help! I am working on a project for smart home. The essence of the extremely primitive, turn-off light, temperature and humidity control, motion sensors. The project is already assembled and working. But I need more functionality, as in this video. Experts help please write a sketch. I very much grateful and probably others too.

В чому проблема? Читаєм, розбираємся…
Віртуальні піни:

Готові приклади:

  1. Please use English. Yes, we are from Ukraine, but forum is made for all the people who can find this information useful. Even Google Translate is better than nothing. Thanks for understanding.
  2. Please check the example sketches h

I’m sorry, the future will try better.

Hello again. I read all the documentation and it seems everything is clear, but in practice can do.
Without concrete examples of how “Standalone”, ordinary users is difficult to understand concerning programming and also unnecessary to him. Ideally, it should be very easy to use. Sorry for my Google translation.