by Дмитрий Сбоев
Cyclic check(every 5 minutes) for enabled WiFi or bluetooth. If enabled, but not connected - wait 1 minute and recheck. If still not connected - turn off. Consists of 2 flows: one for wifi and other for bluetooth.
There is a block in WiFi flow, which checks gps enabled(if gps is on, don't turn off WiFi - for location purposes). If you don't need it - just disconnect or delete this block.