home-assistant / android

:iphone: Home Assistant Companion for Android
https://companion.home-assistant.io/
Apache License 2.0
2.14k stars 608 forks source link

Sensor values from Wear OS are not updated unless app is opened when bedtime mode is enabled #3976

Open R1DEN opened 8 months ago

R1DEN commented 8 months ago

Home Assistant Android app version(s): 2023.10.2-full (phone) 2023.10.2-11484 (watch) Android version(s): 13 Device model(s): Samsung Galaxy S23 Ultra Samsung Galaxy Watch 4

Home Assistant version:

2023.10.5 Last working Home Assistant release (if known):

- Description of problem, include YAML if issue is related to notifications:

The sensors (in this case Theater mode) is being upated in HA only when I open the HA app on my watch. Even if I change the mode right after going back "home" - I still need to reopen the app. I have reinstalled the apps both on my phone and watch multiple times and made 100% sure that all the battery optimizations were disabled.

Companion App Logs: Wear OS LogCat: log.txt HA Companion app logs: homeassistant_companion_log_9-27-2023_13-51-20.txt

I have enabled the mode, went to HA app on my watch, went back "home", disabled the Theater mode and went back again into HA app.

Screenshot or video of problem:

Additional information:

jpelgrom commented 8 months ago

The theater mode sensor does not update instantly, but only during the scheduled sensor updates (~every 15 min, or when a sensor that receives instant updates is updated, or when the app is opened), so what you're describing sounds like it is working as expected.

Do you have issues with other sensors?

R1DEN commented 8 months ago

@jpelgrom this also reproduces with Sleep mode (it triggered bedtime scene) And before the latest Wear OS update (or HA app update) it (bedtime mode) updated instantly

jpelgrom commented 8 months ago

No need to @ mention me.

The same applies to the bedtime mode sensor.

Changing bedtime/theater mode usually changes do not disturb mode, which would trigger an update. Any chance you already have DND enabled perhaps?

Wear OS 4 might also be limiting background updates for apps more than previous versions, that is outside the app control. I don't believe anything changed for these sensors recently that could be causing it.

R1DEN commented 8 months ago

Enabled the DnD sensor and tested with Bedtime mode - it works, but only if I do it right after opening/closing the HA app. If I lock the watch and unlock it - the bedtime sensor is not updated right away and works just as with Theater mode. DnD mode wasn't enabled 100%, but I don't enable it in theater mode.

Sorrry for mentioning, that's a mechanical thing I'm used to doing at my workplace :)

dshokouhi commented 8 months ago

This is a behavior change that I don't think we can work around.

dshokouhi commented 8 months ago

This is the issue being tracked with Google

https://issuetracker.google.com/issues/306580609

dshokouhi commented 8 months ago

I dont see anything in the logs that will be of use here :( I think we need to follow through with Google and hope they will fix it in an upcoming version of Wear OS 4.

Lewis-house commented 3 months ago

@jpelgrom this also reproduces with Sleep mode (it triggered bedtime scene) And before the latest Wear OS update (or HA app update) it (bedtime mode) updated instantly

How did you do your bedtime routine? with home assistant? if so how can I do it thanks