Yes. Tasker will do this. When you're setting up the state, choose "bluetooth connected", then click the magnifying glass next to the "name" field. It will search for paired bluetooth devices. Choose the one you want and configure states/actions. Then do it again for the other BT device.
I am the developer of Locale.
Locale has a plug-in architecture, and there is a free plug-in available on the Android Market called "Locale Bluetooth Plug-in" which provides this functionality.
I have just released a new Bluetooth plugin for Locale - which looks for BT devices by Profile (A2DP (audio devices) or Headset/Hands-Free) - optionally you can select a specific device to look for as well.
Check it out @ Google Play: Locale Bluetooth Audio Plugin