WearOS - automation to annouce battery is at 100% charge

Hi all,

I set up an automation to annouce via TTS to my google assistant speaker to tell me when my watch battery is charged to 100%. Please see below.

alias: Notify Axial Diesel Watch is charged
description: ''
trigger:
  - platform: numeric_state
    entity_id: sensor.axial_3068_battery_level
    above: '99'
condition:
  - condition: time
    before: '21:00:00'
    after: '08:00:00'
action:
  - service: tts.cloud_say
    data:
      message: Your watch is now charged.
      entity_id: media_player.lenovosmartclock1882
  - service: tts.cloud_say
    data:
      message: Your watch is now charged.
      entity_id: media_player.s_room_clock
mode: single

It didn’t work exactly as I thouht it would, and I believe it has to do with the refresh rates, possibly?

Here’s what happend.

I opened the WearOS app on my android phone to check the battery level while the watch was on the charger and the WearOS app on my phone said the battery level was at 100% but I didn’t hear it being announced via TTS So, at that point, I went to the watch on the chager and woke it up, an then the annoucement came.

Is this a watch setting that I have to change? I mean it would be nice that it can send the message to me before I actually go to the watch, if anything, when I opened the WearOS App, it should have notified me then?

any thoughts?

1 Like

make sure the wear OS app has proper background permissions including battery optimizations disabled

good point. Just checked and the WearOS app is listed under Power-saving exception. Perhaps it was just a temporary communication issue between the WearOS app and Home Assistant Companion app (which also listed as Power-saving exception).

I’ll see how it goes again tonight!

there could be more settings to look at, the app needs unrestricted access in the background, also did the watch have a data connection at that time or did it connect once it was woken up?

I’ll look into the settings again, to see if it has full access.

As for the data connection question, I believe it did because before (1-2 minutes before) I took my watch off the charger, the WearOS app on my phone was reporting 100% charge.

I’ve been trying to get consistent updates from my Wear watch through the Android companion app, and so far I’ve found nothing/no sequence that reliably updates. If someone does get updates from the sensors on their Wear OS watch, please clue us in.

my wear OS sensors update just fine when the watch is connected, you need to ensure the app has proper access to run in the background so disable battery optimizations, power saving etc…

Good to know. I’m using Android 9 and I don’t know what other settings/permissions to give other than below

Since WearOS app was correct in reporting the charge it must be something to do with my phone then.

I’m not sure how the flow of data goes but if it’s watch - > WearOS app - > HA app - > HA, then something broke down between tbd WearOS app - > HA app step.

Your screenshot is of the phone app and not the watch. Go on the watch and make changes directly there in settings. Remember the watch is its own android device in addition to the phone, for our use case both phone and watch needs to be excluded.

if you suspect a data issue like you suggest then you will need to look at the logcat logs from the watch itself to properly troubleshoot.

I must be a complete moron. I have gone through every system setting multiple times and have not found where I can disable battery optimization for individual apps. I even took a couple hour break before going back again and going through them all one more time. I have found some settings for ‘Essential Mode’ but nothing that allows granular control on an app by app basis. I even enabled Dev mode and went through all of those settings. What am I missing here? Will disabling Essential Mode altogether take care of this? If it matters, although I can’t think of why it would, I have a Ticwatch Pro 3 GPS. Thanks for any help and THANK YOU for your work on the app

Maybe im mistaken about this particular setting on a watch, sorry about that. What issue are you guys seeing with the sensors? are you expecting HA to update the moment the watch hits 100% because that won’t happen here, battery level updates every 15 minutes if and only if the watch has an active data connection. Otherwise the watch will wait until it gets a data connection and then it will update.

1 Like

@dshokouhi you are 100% correct.

Tonight, I charged my watch again, this time I only checked it once and it was at 96%…I’m not exactly sure when it hit 100%, but within 15 minutes the automation ran and got the audio tts alert.

So, yes it works, just not instantly.

I did not change any background actions for this to work, whatever it installed with seems to be enough.

Thank you!

1 Like

Same happened for me today. I had it set on my desk charging and my tts went off as planned. Works a treat when you learn the value of patience.

1 Like