Lightning protection of home automation systems