Did you know that with OS X Yosemite you can lock bluetooth so it can’t be turned off it’s already on, or vice versa?
Quit System Preferences if it’s already open, then start it and hold down the Option key (this is called Alt on British keyboards). Then click the Bluetooth icon in System Preferences. A padlock symbol will appear alongside the on/off switch for Bluetooth. Just click it to activate the lock. You’ll need to type your login password when prompted.