Android Automotive missing Car Sensors

I’ve installed home assistant from the play store on my new car’s built-in android automotive.
I was able to enable some useful sensors such as bluetooth and wifi status, but the ‘car sensors’ that include things like the fuel level seem to be missing entirely.

Only the minimal version of the play store build has access to those sensors as Google asked us to hide the setting option in that build. Not sure how you got into settings in that case. Maybe it’s not actually automotive OS?

It’s definitely automotive. I did find a non-obvious way to get to the settings… I really wanted to be able to set favorites :sweat_smile:
That’s a shame about the sensors…

how did you get in?

if sensors could be somehow tested in the full version build we could let them be available but since they were not tested we did not leave them open.

If there’s something I can do to help with the testing of the sensors, lmk :wink:
I think they would be cool to have.

Unfortunately a change like this requires using android studio to make the code changes and test in an emulator. Its not as straightforward if you have not developed android applications in the past.

I actually do maintain a couple cross-platform android/iOS apps, but I’ve never done anything with AAOS or AA. I think the workflow wouldn’t be entirely foreign to me with a little guidance.

ok well you would first need to make sure to follow the project readme including the firebase notification part so you can actually get the notifications

https://github.com/home-assistant/android

once done you will need to install the the android automotive emulator

https://developer.android.com/training/cars/testing/emulator

now the emulator is not the best, when you spin it up youll need to open the play store (deal with a crash or 2) and update one of the apps (I forget which one but its required for automotive)

Once you get that done. The code change here is quite simple, we need to adjust this condition https://github.com/home-assistant/android/blob/d8fc2221418eb9191c66f75788da2074d7a7e638/app/src/main/java/io/homeassistant/companion/android/sensors/CarSensorManager.kt#L198 so the automotive check no longer accounts for the flavor.

from there once you run the app and get to settings you should see the sensors there and can enable them.

1 Like

great, thanks for the rundown!
I’ll poke around when I have a few hours to put towards it :+1:.

1 Like