The bluetooth device tracker had some issues. I tried to address the following in this PR:
The currently connected devices were only counted on init, while the intents are only received while the condition is active. Fix this by moving the counting code to start().
Intent BluetoothDevice.ACTION_ACL_DISCONNECTED seems not to fire when locally disabling bluetooth. Fix this by listening for adapter state changes as well.
The bluetooth device tracker had some issues. I tried to address the following in this PR:
The currently connected devices were only counted on init, while the intents are only received while the condition is active. Fix this by moving the counting code tostart()
.BluetoothDevice.ACTION_ACL_DISCONNECTED
seems not to fire when locally disabling bluetooth. Fix this by listening for adapter state changes as well.