Home Assistant Companion Android App Release 3.0.0

Hey everyone its been a little while since we last spoke. We have a brand new Home Assistant Companion for Android release that we are excited to get into your hands and will roll out over the next day or so in the Google Play store.

Before we get into the release details I’d like to mention that this month marks the 1 year anniversary of the Home Assistant Companion app being offered in the Google Play Store! Just to think how far along the entire app has come from its initial alpha state to what is currently being offered in today’s release. Can you believe its already been a year?

It has been pretty busy over on the Android side of things during Hacktoberfest! We have seen a total of 84 pull requests from a wide range of contributors that we are thankful for, so thank you for all of your efforts! In case you missed it we actually had a release shortly after version 2.4.0 but as we did not have an accompanying blog post, we’ll cover whats new since we last spoke in this post. All of the features listed below are already documented on the Companion site, please be sure to check in there for greater details. Before we continue with what’s new lets go over the breaking changes for this release.

Breaking Changes

In our last blog post we mentioned that we were going to be breaking up some sensors and their attributes. As of 3.0.0 we have completed this task and no longer have non-static attributes as part of any sensor. If you are missing any data please check the Manage Sensors screen under App Configuration and enable the sensor you were previously using as an attribute.

Another major breaking change in this release is that the widgets were refactored to align with the application architecture. Unfortunately this means that some existing widgets may disappear from your home screen and will need to be recreated. We apologize for this and are unable to bring back the existing widgets that were lost. If you forgot what data was there we do have that saved, more on that down below.

Onboarding Improvements

The first big change is that our onboarding screen has changed, we now ask the user to enter their preferred device name that gets attached to all entities that are created by the app. This was a source of frustration for some users as this meant that anytime they logged into the app they would then need to rename their entities to the name that they actually want. By default the device name is the device model but that is not meaningful to some users, especially if they have more than one device of the same model.

Screenshot of the new onboarding flow.

New Sensors

We have several new sensors to welcome to the app, all of which are disabled by default. The first set of sensors were actually introduced in 2.5.0:

  • Traffic Stat sensors - Sensors whose state represent the amount of data sent and received by the device. Mobile data may not be accurate, it depends on the data that we get from the API.

The following sensors are new in 3.0.0:

  • Keyguard sensors - Sensors that represent various states from the Keyguard API, such as if a device is currently locked or has a password setup. These sensors will update during the periodic 15 minute interval.
  • Last Notification sensor - A very powerful sensor that requires a special permission you must grant to read all notifications posted on the device. All attributes of the notification are provided as attributes for the sensor. You can think of this sensor as a great way to integrate any app that posts a notification to your device allowing you to automate around it. Personally I have been using it to integrate a food delivery app, to detect when my order will be delivered and automate around it. This sensor will update as soon as a notification is posted.
  • Last Update Trigger - A sensor whose state will represent the reason for the last update that was sent to your Home Assistant instance. This sensor will update anytime an update is sent to your Home Assistant instance.

Sensor Settings

We didn’t stop at just adding new sensors, we also made enhancements to the overall sensor experience. Starting from version 2.5.0 certain sensors have custom settings that can help with what updates actually get sent to your Home Assistant instance.

Screenshot of location settings.

  • Next Alarm - This sensor has a setting for an allow list. This means that if you have an app that reports really odd timestamps as an actual alarm, you can now ignore them by telling the app which packages to send reports from. By default the list is blank. Tasker users are recommended to make use of this setting.
  • Last Notification - This sensor also has an allow list to let the user create a list of apps from which they want notification data from. By default all notifications are sent to your Home Assistant server. We highly recommend that you set up an allow list as soon as you can think of one to prevent a high amount of updates. You will be surprised by the amount of data that will show up in a short time period.
  • Last Reboot - A bug was discovered where sometimes the timing in the calculation of the device’s last reboot could be off causing an unnecessary update. There is now a deadband setting to allow you to adjust the timing to ignore updates. By default this is set to 1 minute, you most likely won’t need to change this.
  • Location Sensors - All 3 location sensors now have settings to allow you to adjust the minimum accuracy required to send a update to your Home Assistant server. There is also a setting to adjust the minimum amount of time between updates. This should help a lot of users out who don’t get the location results they expect. We recommend changing this setting after you evaluate all of the location fixes in 3.0.0 as location tracking may already be improved without needing to adjust these.
  • WiFi BSSID - This sensor has a setting that will allow the user to provide an alias for the currently connected BSSID. Not everyone can remember a MAC address let alone dozens of them. This setting is designed to help out those who use this sensor to make better sense of things without the need for secrets or templates. If you live in a household with multiple access points you may find it useful to set up an alias to help with things like room presence. By default this sensor reports the connected MAC address.

Android 11 Power Menu

We now integrate with Android 11’s power menu device control feature. The following domains are currently supported:

  • automation On/Off
  • climate Temperature slider
  • cover Open/Close
  • fan On/Off, speed slider
  • input_boolean On/Off
  • input_number Number control slider
  • light On/Off, Brightness control slider
  • lock Lock/Unlock
  • scene Turn on scene
  • script Turn on script
  • switch On/Off

Screenshot of power menu.

Notification Improvements

There have been several improvements to notifications as well.

  • An event gets sent upon a notification being cleared along with all notification data.
  • Notifications can make use of the alarm stream to bypass a device’s ringer mode setting. This can be useful if there is an important event such as an alarm being triggered. Make sure to check the updated Android examples on the companion site.
  • Text To Speech notifications, with the ability to use the alarm stream if desired. By default it will use the device’s music stream. There is also an additional option to temporarily change the volume level to the maximum level while speaking, the level would then restored to what it was previously.
  • New device commands to control your phone: broadcasting an intent to another app, controlling Do Not Disturb and ringer mode.
  • Opening another app with an actionable notification, make sure to follow the Android examples.

Other Enhancements

We have also spent time making improvements to all other areas most notably inside App Configuration:

Screenshot of settings.

  • App language can now be overridden to match a user’s profile, this will impact the name of entities that get added as well as the App Configuration appearance. By default your device will use your phones language however, we noticed some users actually prefer Home Assistant to always be in a different language on their device. With this feature you can now set the language to be one of any that are supported by the app. You can also help us translate the app on Lokalise.
  • History of recently received notifications, along with all data that was sent
  • Notification rate limit information to help you understand if you are about to go over the daily limit.
  • Editable widgets, with the ability to delete missing widgets as mentioned in the breaking changes. This is really helpful if you ever created a widget and realized you needed to make one more adjustment.
  • Widgets now update when the screen turns on to provide faster updates
  • A new widget to control any media player

Screenshot of media player widget.

  • Enable/Disable all sensors
  • Events for entering or exiting a zone along with all location data
  • Link to the current release changelog on GitHub
  • File upload support for add-ons or person image upload
  • The ability to opt out of sending crash reports to help the team investigate crashes. If you decide to opt out please make sure to report issues on GitHub otherwise we may not know the issue exists.
  • Lots of location fixes for more accurate reporting
  • Lots of bug fixes and other miscellaneous enhancements

Big thank you to everyone involved. Hope you take the time to digest all the new features. Looking forward to all the new use cases and feature requests everyone has been having.

The full changelog can be found on GitHub.


This is a companion discussion topic for the original entry at https://www.home-assistant.io/blog/2020/11/06/android-300-release/
8 Likes

I just got this release and it’s quite amazing. The feel is “everything is coming together”! The configurations are organized, the sensors open up a ton of possibilities and the language selector is really appreciated!

1 Like

Really liking this new release. Just one question, doesn’t the WiFi Connection Sensor kinda defeats the purpose of providing an alias in the WiFi BSSID Sensor?

If you live in a household with more than 1 access point where they all share the same SSID then it is useful. But if you only have 1 access point then chances are you don’t need BSSID enabled.

1 Like

Just to say that the new last notification sensor is amazing!
The two restaurants near home send a SMS message with the ETA, so I’ve created an automation to say in Alexa in how many minutes will be ready for collection and when is time to pickup she’ll warn also.

4 Likes

Great! Do you mind sharing the automation?

Awesome! Love the updates…keep them coming! Please please please allow us to customize the notification icon that is shown in the notification bar! We can change the color but we’d love to be able to change the icon all together. The app Join by joaoapps does this which is what i’ve used for notifications via node red thus far. Would be awesome to be able to utilize the native push notifications from the app though.

Loving the Android 11 Power Menu integration. This app has gone from great to awesome!

3 Likes

Yea. The content is in portuguese but you might be able to understand.

- alias: 'Warn time left to Quattro or Borza'
  trigger:
    - platform: state
      entity_id: sensor.nicolas_mi9_last_notification
  condition:
    - condition: template
      value_template: "{{ trigger.to_state.state | regex_search('Quattro Woodfired|Borza Stepaside', ignorecase=True) }}"
  variables:
    in_minutes: "{{ states('sensor.nicolas_mi9_last_notification') | regex_findall_index('([0-9]*) minutes', ignorecase=True) }}"
  action:
    - service: notify.alexa_media
      data_template:
          data:
            type: announce
          target:
            - media_player.everywhere
          message: >
            {% if 'Quattro Woodfired Pizza' in states('sensor.nicolas_mi9_last_notification') %}
              O pedido no Quatro estará pronto em {{ in_minutes }} minutos.
            {% elif 'Borza Stepaside' in states('sensor.nicolas_mi9_last_notification') %}
              O pedido no Bórza estará pronto em {{ in_minutes }} minutos.
            {% else %}
              O pedido estará pronto em {{ in_minutes }} minutos.
            {% endif %}
    - delay: "00:{{ in_minutes }}:00"
    - service: notify.alexa_media
      data_template:
          data:
            type: announce
          target:
            - media_player.everywhere
          message: >
            O pedido está pronto.
4 Likes

We have an existing feature request for that here: Replacing the Home Assistant Icon in Notifications · Issue #793 · home-assistant/android · GitHub

Thank you, I came up with this:

- alias: IncomingCall
  description: ''
  trigger:
  - platform: state
    entity_id: sensor.pixel_2_xl_last_notification
    attribute: android.text
    to: 'Incoming call'
  condition:
  - after: '07:00'
    before: '21:00'
    condition: time
  action:
  - service: script.announce_main
    data:
      message: Sachin, you are getting call from {{ states.sensor.pixel_2_xl_last_notification.attributes.android.title }}. 

Yours one is next level.

1 Like

Can TTS work if my home assistant server uses an SSL certificate? I would love to use it for my wall panel but have had issues with other TTS destinations due to SSL failing against the local HA https ip because the cert is for my external duckdns domain. Only suggested solution I’ve found for those other cases is a NGNIX proxy :frowning:

as long as you can send a notification to your phone it will work :slight_smile:

1 Like

You guys are just amazing!!! Kudos to all for the great work and amazing updates… ::smiley: Loving it!!

1 Like

Wow!

Especially the notification trigger is very powerful to a creative mind!

1 Like

It’s been partially broken for me since the previous release: https://streamable.com/gia6if the app is completely frozen when resuming it either from the multitask screen or the launcher. It has to be closed before it can be used again. I’m not technical enough to report this on the GitHub page.

check that android system webview is up to date and that all custom cards are up to date

Thanks for the suggestion. Webview is up to date, while HACS is installed, the only thing in use is Google Dark Theme. I’ve just noticed that the app exhibits the same behaviour when entering and then leaving the app configuration item. This has only started happening in the last few updates, it worked fine before that.
Pixel3a. Android 11.
Note - the app functions normally, until you press the home button or enter and leave the app configuration menu

Love the TTS message!
Now I can finally wake her up when she falls asleep while putting our smallest in bed.
Just TTS a message with channel: alarm_stream_max to her headphones.
This is going to be fun! :smiley:

1 Like

Looking for a version where support WearOS!!

1 Like