Command to turn on/off bluetooth on my android not working

Hi,
I’ve been trying to get the command to turn on/off bluetooth on my android working, but whatever I do it doesn’t work. I just get a text notification on my phone instead.
I follow exactly the instructions available here so:

service: notify.mobile_app_mobile_quizzical
data:
  message: command_bluetooth
  data:
    command: turn_off

I am already using many other commands successfully, so I don’t understand what the problem is with the bluetooth command.
I’m on Android 13.
I don’t thing it’s a permissions problem as usually when that’s the case the HA Companion app warns me. Also I didn’t see a way to specifically enable this in the app permissions.

Does anyone have this working succesfully?
Many thanks

1 Like

I have this working. It looks like you have the service call right. It’s possible it’s never getting to your phone. Try changing the service call to this:

service: notify.mobile_app_mobile_quizzical
data:
  message: command_bluetooth
  data:
    command: foo

You should get a notification on your phone with the contents “command_bluetooth”. If you don’t, then there’s some issue with your mobile app integration. If you do, well then I’m really not sure.

Thanks for the suggestion.
I probably wasn’t clear enough but already with the service call I posted I get a notification with contents “command_bluetooth”. Logically when changing ‘turn_off’ to ‘foo’ I still get the same notification.

Good to know that it’s working for you, then at least I know it’s specific to me, but I don’t really know what could be the problem :-/

This can be an issue with rights to do change the settings and unless you know the android version of other users, then you can’t really deduct much from their experience. Android change a lot from version to version in regards to right management.

1 Like

Ah I see now, my mistake. Just woke up :slight_smile:

Fwiw I’m on Android 12 and version 2022.12.0-full of the HA app.

If you haven’t already, try the discord channel. They’re really responsive and helpful.

You’re right they were helpful on discord.
They told me that the documentation says ‘Android 12 or older’
My brain is so accustomed to seeing things being supported for version X and newer that the ‘older’ just didn’t process. Unfortunate that this doesn’t work anymore as from Android 13 :(:frowning:

At this moment turn on/off bluetooth isn’t working on Android 13

I can confirm the same: bluetooth_command is not working on my Android 13.
Companion App: Current Latest version (2023.1.1-Full)

Btw just to clarify, looking forward to Android 13 and beyond, it seems unlikely that this functionality is going to be restored. This seemed to be a decision on the underlying Android API.

It’s unfortunate that they are restricting controls. All I can suggest is to consider why you are turning BT on/off and if there’s a better way to handle your use case.

I know this thread is a little old now but a couple of points here…

  1. you can use Macrodroid to receive a notification from HA and get it to turn off bluetooth (inc on Android 13)
  2. If Macrodroid can do it, why can’t HA? I get the change was in SDK33 but dont you have to use that if targeting compatibility with Android 13? As such, isnt Macrodroid achieving this on SDK33?
1 Like

Hello

Not heard of macrodroid, just installed it and having a look around, how do you get the notification part in as a trigger?

Notification is under Device Events. Select HA as the app the notification is from etc.

is this still a problem on android 13 ? it dont work with pixel 7a, how do I fix it?

Good morning
I’m raising this again, because I have a Redmi Notes 12 phone and I also can’t activate the Turn on/off command for Bluetooth!

Did I film the problem to show you

I tried it on a Huawei Android 8 tablet and it works very well.
Is there a solution ?

1 Like

My Redmi Notes 12 phone’s Bluetooth is not working too. Dnd is working fine.