i don't understand the programming examples as light switchs
It could also be helpful to look at the Bluetooth Mesh Profile specification. In addition, there are many great posts available on the Bluetooth website. They could be helpful to understand bluetooth mesh better: link 1, link 2, link 3, link 4, link 5, link 6, link 7, link 8, link 9, link 10.