You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Home Assistant Android version: 2021.12.3-full (any version >= 2021.12.0)
Android version: 12
Phone model: Google Pixel 4a
Home Assistant version: Core 2021.12.5
Last working Home Assistant release (if known): Any app version < 2021.12.0, before widgets switched to using websocket
Description of problem: When turning on the device, via the broadcast receiver registered for widgets a new websocket connection is established for state changes regardless of whether a widget has actually been added or not. This shouldn't happen and will drain the battery faster if there are no widgets. (Thankfully at least the app stops collecting the flow when the screen is turned off which will end the subscription.)
The in-app option didn't show me any messages from before starting the app in the foreground, so this was copied from logcat. (I first noticed the issue when working on a PR, and switching to the master branch also showed this, so searching for the same messages at the same times from another app should be the stable version.)
2021-12-24 22:20:03.380 19451-19451/? D/SensorReceiver: Sensor is_interactive corresponding to received event android.intent.action.SCREEN_ON is disabled, skipping sensors update
2021-12-24 22:20:03.381 19451-19451/? D/ButtonWidget: Broadcast received:
Broadcast action: android.intent.action.SCREEN_ON
AppWidgetId: -1
2021-12-24 22:20:03.381 19451-19451/? D/ButtonWidget: Updating all widgets
2021-12-24 22:20:03.387 19451-19451/? D/UrlRepository: localUrl is: true and usesInternalSsid is: true
2021-12-24 22:20:03.389 19451-19451/? D/WebSocketRepository: Sending message number 7: {type=subscribe_events, event_type=state_changed, id=7}
2021-12-24 22:20:03.390 19451-19451/? D/WebSocketRepository: Message number 7 sent
2021-12-24 22:20:03.391 19451-19451/? D/MediaPlayCtrlsWidget: Broadcast received:
Broadcast action: android.intent.action.SCREEN_ON
AppWidgetId: -1
2021-12-24 22:20:03.394 19451-19451/? D/UrlRepository: localUrl is: true and usesInternalSsid is: true
2021-12-24 22:20:03.397 19451-19921/? D/WebSocketRepository: Websocket: onMessage (text)
2021-12-24 22:20:03.398 19451-19921/? D/WebSocketRepository: Message number 7 received: {"id": 7, "type": "result", "success": true, "result": null}
2021-12-24 22:20:03.401 19451-19451/? D/UrlRepository: localUrl is: true and usesInternalSsid is: true
2021-12-24 22:20:08.144 19451-19921/? D/WebSocketRepository: Websocket: onMessage (text)
2021-12-24 22:20:08.155 19451-19921/? D/WebSocketRepository: Message number 7 received: {"id": 7, "type": "event", "event": {"event_type": "state_changed", "data": [removed], "last_changed": "2021-12-24T17:45:10.367883+00:00", "last_updated": "2021-12-24T21:20:08.241326+00:00", "context": {"id": "463c28f6a07feab0cd6f5ba51101f5a8", "parent_id": null, "user_id": null}}}, "origin": "LOCAL", "time_fired": "2021-12-24T21:20:08.241326+00:00", "context": {"id": "463c28f6a07feab0cd6f5ba51101f5a8", "parent_id": null, "user_id": null}}}
Screenshot of problem:
Additional information:
The text was updated successfully, but these errors were encountered:
And some other way to start the flow once a widget has been added, otherwise the state will probably remain static after adding it until the user turns the screen off and on again?
Missed the intent that is fired for widgets that need updates when they're added to trigger the screen on function, so just a check in the database for saved widgets should indeed work.
Home Assistant Android version: 2021.12.3-full (any version >= 2021.12.0)
Android version: 12
Phone model: Google Pixel 4a
Home Assistant version: Core 2021.12.5
Last working Home Assistant release (if known): Any app version < 2021.12.0, before widgets switched to using websocket
Description of problem: When turning on the device, via the broadcast receiver registered for widgets a new websocket connection is established for state changes regardless of whether a widget has actually been added or not. This shouldn't happen and will drain the battery faster if there are no widgets. (Thankfully at least the app stops collecting the flow when the screen is turned off which will end the subscription.)
Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):
The in-app option didn't show me any messages from before starting the app in the foreground, so this was copied from logcat. (I first noticed the issue when working on a PR, and switching to the master branch also showed this, so searching for the same messages at the same times from another app should be the stable version.)
Screenshot of problem:
Additional information:
The text was updated successfully, but these errors were encountered: