Home Assistant Companion Android App: New Features

Hey there, its been so long since we last gave an update on our mobile apps we thought it would be time to give you more updates! This time around we will focus on whats new in the Android app. There have been a few releases so were going to cover everything new up until version 2.3.0 which was just released to the Google Play Store.

Manage Sensors

Starting from version 2.2.0 there is a new Manage Sensors screen that you can find under App Configuration. Users can now disable sensors they don’t want while continuing to receive updates from the sensors they do care about. This includes turning off the Geocoded sensor while keeping location tracking on. Speaking of which the 2 location toggles that used to be found in App Configuration are now located in this new screen. You can expect to see the live data that was recently sent over to your Home Assistant server as well as the attributes and other sensor details.

Screenshot of the Manage Sensors.

Screenshot of Sensor Management.

New Sensors

We have had quite a bit of sensors get added since we last spoke so here’s whats new. Some of these sensors will update their state in your Home Assistant server upon certain state changes. All of the sensors listed below will also update during the normal 15 minute update interval. To get more details about what to expect from each sensor check out the docs.

Available for Google Play Store version only:

Available for all users:

  • Audio
  • Bluetooth
  • Do Not Disturb
  • Last Reboot
  • Light
  • Phone
  • Pressure
  • Proximity
  • Next Alarm
  • Sim 1 & 2
  • Steps
  • Storage

Sensor Enhancements

In addition to all the new sensors mentioned above we also had some improvements to our existing set of sensors. The battery state sensor now includes the battery health as a attribute and will also issue a second update call a few seconds after being plugged in so the state can update faster. The WiFi connection sensor was also updated so the state and certain attributes will update upon any network detected change. This state change also means that if you have multiple access points you will be able to see the device switching in real time.

NFC

The app now supports reading and writing to NFC tags so you can build automations off scanning the tag. Home Assistant Core 0.114+ is required for this feature. Keep in mind that certain phones will require you to have your phone unlocked before it can read the tag. More details about how it works in the docs.

Screenshot of NFC.

Template Widget

A new widget was added to give the user full control over creating a template widget with just about any data they want! Users will see the template rendering in real time as they build it. I personally recommend to start building your templates on a desktop as it can feel a bit cumbersome on a phone or tablet. This widget will update every 15 minutes or when it is tapped.

Screenshot of the Template Widget.

Theming

You can now set the theme of the app independently from the device theme. This is useful for users who like a dark theme on their device but use a light theme for Home Assistant. In addition to this change we also had a few more fixes around themes.

Screenshot of App Theme selection.

Additional Improvements

  • Support for H265 videos was added
  • Entity state widget was enhanced to allow for multiple attributes and a custom separator
  • Widgets were enhanced overall to allow material icons
  • Notifications can now use :smiley: like you can in Discord
  • Lots of fixes across the board

Special thanks to chriss158, colincachia, David-Development, JBassett, klejejs, noam148, skynetua and uvjustin for all of your contributions. So keep them bug reports and feature requests coming, we’ll chat again soon!


This is a companion discussion topic for the original entry at https://www.home-assistant.io/blog/2020/08/28/android-230-release/
13 Likes

Great job, really like the NFC part, works very good

1 Like

Really good job guys, the sensors you have added over the weeks is really useful to use. Glad its coming along.

Awesome, thanks! As a new HA user since a few months, I actually didn’t know that there were Android/iOS Home Assistant apps. I guess these apps could be promoted a bit more, e.g. add a link to them in the footer of the HA website and/or in the info section of every Home Assistant instance.

You guys rocks, thank you so much for your work :pray:

I can’t wait to include a heap of these new sensors. Great work!

Looking a the sensors for my Android phone in HA I see some don’t update very often at all. ie: light sensor hasn’t updated for over 45mins despite me changing it from direct light to in darkness. I’m not concerned about that as I have very little use for it, however I see exciting an automation future for the ‘phone state’… problem is, that is laggy too. Is there any way to speed up the refresh of these?

The phone state sensor updates upon a state change so it’s pretty instant going to ringing and offhook.

Ok thanks, I’ll have a play with it.

Through some quick testing I have found the Lux sensor only updates when the HA app is first opened. To get it to refresh I have to completely shutdown the app and open it again. Not sure if this can be resolved but it makes the sensor rather useless.

Thanks for all your great work on this app :+1:

Perhaps you have some battery savings on the app.
My phone does that by default on all apps and limits them to be used when not in foreground, when the screen is off and in sleep.
So pretty useless, but it can be disabled.

Yea sometimes it does update on its own. Its an odd one because when we query it there is only a short window it waits for an update and if we don’t get one it does not come through. Not only that but the events are not guaranteed when the app is not in the foreground. I see something similar on my Pixel at times but sometimes it does update when I didn’t touch the app. On a wall mounted tablet that keeps HA open all the time its a different story, it updates all the time during the interval. Its a bit difficult when the system decides not to give us an update, it may be something that can improve if we decide to use a foreground service/notification for updates to be more reliable.

That’s good to hear for the example of a wall mount tablet. I’m currently just looking at my phone for detecting ringing, but a tablet using the Lux sensor will be handy. Thanks

Since I almost always have my phone on vibrate only and leave it lying around the house (I hate the concept of being tied to my phone)…

automation:
  - alias: Daves S20 Ringing announce at home
    trigger:
      - platform: state
        entity_id: sensor.daves_s20_phone_state
        to: ringing
    condition:
      - condition: state
        entity_id: person.dave
        state: home
      - condition: time
        after: '08:00:00'
      - condition: time
        before: '18:30:00'
    action:
      - service: rest_command.assistant_broadcast
        data:
          command: Daves phone is ringing
      - delay: '00:00:10'
      - service: rest_command.assistant_broadcast
        data:
          command: Daves phone is ringing

Thanks again @dshokouhi

3 Likes

The NFC and QR code support looks really interesting and fun. I can see how that now makes easy door-unlock use-cases easier to handle, since I can now trust the authenticated delivery of the tag_scanned event in Home Assistant.

For the QR code use-case – can I suggest that the application also register for a shorter, more compact URL to process scanned QR codes? The longer https://www.home-assistant.io/tag/tagid URLs make for some fairly large and involved QR codes…

Also, in the tag_scanned events - is there an obvious way to map the device_id back to the specific device? Or some clever way to map the user_id back to a person other than iterating over all of the person entities, matching against the user_id attribute?

Once I create a launcher widget on Android, is there a way to edit the template? It might also be nice to be able to specify an action when tapped? Finally, in this same vein, the most useful feature missing it to be able to create a shortcut to launch the Home Assistant companion app to a specific lovelace page. It’s often hard to navigate the titles on the narrow screen of the phone to select the correct one that I’m trying to reach.

Thanks for all the work on the Android application of late - this is really working nicely these days.

Just one question, I use a self-made ssl certificate (LAN Only) and a VPN to connect my mobile to it. Is it possible to disable the certificate-check, so I can use the app?

Is there a way to get the next alarm reliably while still using tasker? The next alarm time is now changing continuously to a few minutes in the future.

you might be able to use: https://companion.home-assistant.io/docs/troubleshooting/faqs/#using-a-self-signed-certificate-leads-to-a-blank-page-in-android

See if these steps are helpful: https://github.com/home-assistant/android/issues/748#issuecomment-683302649

Truly a great app. It would be very useful if we can have the battery and phone temperatues as sensor outputs. How easy will it be to implement this?

I tried a lot, but none is working. To be clear what file do I need to import to my Android? The one mentioned in my configuration.yaml:

http:
  ssl_certificate: /ssl/cert.pem
  ssl_key: /ssl/privkey.pem

So in other words, do I need the certificate, key or both?