The Android beta program gives us a chance to see the latest features of Android, some of which don’t actually work yet. That was the case when the first developer preview came out with an option to automatically switch WiFi on when you get near a trusted network. The toggle was non-functional in the first dev preview, but it works in DP2.
This option is available in Network and internet > WiFi > WiFi Preferences.
Android O feature spotlight: You can automatically enable WiFi near trusted networks, and it now works in DP2 was written by the awesome team at Android Police.