The earth wires have been omitted for clarity and would need for being connected at all switches and ceiling roses. The wires would even be covered because of the protective outer sheath (cable). When the switch is on, electricity flows through the switch with the inbound wire to your outbound https://electric-hub98074.blogdigy.com/smart-light-switches-fundamentals-explained-52262901