Closed Dividing6043 closed 1 year ago
Please reproduce the issue and get the companion app logs. Settings > Companion App > show and share logs
I have tried just updating the button with the Entity ID and get the following from the logs:
Looks like the service data saved successfully, can you please get us the logs when you click on the button after saving it?
04-20 16:56:34.449 23244 23244 D ButtonWidget: Saving service call config data:
04-20 16:56:34.449 23244 23244 D ButtonWidget: domain: switch
04-20 16:56:34.449 23244 23244 D ButtonWidget: service: toggle
04-20 16:56:34.449 23244 23244 D ButtonWidget: service_data: {"entity_id":["switch.smart_plug_4"]}
04-20 16:56:34.449 23244 23244 D ButtonWidget: require_authentication: false
04-20 16:56:34.449 23244 23244 D ButtonWidget: label: test
The logs provided were from after saving. To save I am just hitting the Update Widget button after adding the Entity ID. I have tried again, and here are the logs:
@Dividing6043 sorry I was not talking about saving the widget data. I was asking about pressing the button widget itself on the home screen to execute the service call. I want to see what the failure looks like as the logs indicate its saving to the database correctly.
No problem. I have just updated the widget again and saved it with the correct Entity ID. I then clicked the button. Here are the logs from just the button push:
04-20 18:06:01.801 23244 23244 D IntegrationRepository: setAppActive(): false
04-20 18:06:01.803 23244 23244 D IntegrationRepository: setAppActive(): false
04-20 18:06:01.839 23244 23244 D LocBroadcastReceiver: Received location update.
04-20 18:06:01.849 23244 23244 D ForegrndServiceLauncher: Check if service HighAccuracyLocationService is running. Service running = false
04-20 18:06:01.850 23244 23400 D LocBroadcastReceiver: Last Location:
04-20 18:06:01.850 23244 23400 D LocBroadcastReceiver: Coords:(51.251367, -0.0680806)
04-20 18:06:01.850 23244 23400 D LocBroadcastReceiver: Accuracy: 11.536
04-20 18:06:01.850 23244 23400 D LocBroadcastReceiver: Bearing: 0.0
04-20 18:06:01.851 23244 23400 D LocBroadcastReceiver: Begin evaluating if location update should be skipped
04-20 18:06:01.855 23244 23400 D LocBroadcastReceiver: Received location that is 34 milliseconds old, 1682010361817 compared to 1682010361851 with source fused
04-20 18:06:01.861 23244 23400 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
04-20 18:06:01.895 23244 23400 D LocBroadcastReceiver: Location update sent successfully for 2 as exact
04-20 18:06:02.748 23244 23244 D ButtonWidget: Broadcast received:
04-20 18:06:02.748 23244 23244 D ButtonWidget: Broadcast action: io.homeassistant.companion.android.widgets.button.ButtonWidget.CALL_SERVICE
04-20 18:06:02.748 23244 23244 D ButtonWidget: AppWidgetId: 92
04-20 18:06:02.752 23244 23244 D ButtonWidget: Calling widget service
04-20 18:06:02.764 23244 23244 D ButtonWidget: Service Call Data loaded:
04-20 18:06:02.764 23244 23244 D ButtonWidget: domain: switch
04-20 18:06:02.764 23244 23244 D ButtonWidget: service: toggle
04-20 18:06:02.764 23244 23244 D ButtonWidget: service_data: {"entity_id":["switch.smart_plug_4"]}
04-20 18:06:02.796 23244 23244 D ButtonWidget: Sending service call to Home Assistant
04-20 18:06:02.800 23244 23244 D ServerConnectionInfo: localUrl is: false, usesInternalSsid is: false, usesWifi is: true
04-20 18:06:03.042 23244 23244 D ButtonWidget: Service call sent successfully
04-20 18:06:09.669 23244 23244 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1682010362802, currentMillis: 1682010369669)
04-20 18:06:09.686 23244 24418 E OpenGLRenderer: Unable to match the desired swap behavior.
04-20 18:06:09.735 23244 23244 D IntegrationRepository: isAppLocked(): false. (LockEnabled: false, appActive: false, expireMillis: 1682010362802, currentMillis: 1682010369735)
04-20 18:06:09.735 23244 23244 D IntegrationRepository: setAppActive(): true
04-20 18:06:11.130 23244 23400 D LogcatReader: Read logcat for pid 23244
according to this log its working
04-20 18:06:02.796 23244 23244 D ButtonWidget: Sending service call to Home Assistant
04-20 18:06:03.042 23244 23244 D ButtonWidget: Service call sent successfully
are you certain the entity ID is correct and that the switch.toggle
service call works for the entity in question?
04-20 18:06:02.764 23244 23244 D ButtonWidget: service_data: {"entity_id":["switch.smart_plug_4"]}
Edit: are there any HA core errors at the time of clicking on the widget on the home screen?
Sorry, I have just checked. And in this instance it did work and the plug correctly toggled from off to on. However, if I go back and try to modify the widget, the Entity ID is no longer displayed. I assumed that the widget would therefore not work. However, on reflection it appears in this case it is working. I guess this makes the bug a little simpler... It should display the existing Entity ID, not blank. I will test some of my other buttons as they have additional field info that also appear to be removed when modifying.
ok thanks for confirming, so the data is there just the issue is with the display of the data :) Could you also share a screenshot of the missing data so we can see what the full UI looks like. If you can grab before and after pics that would be more helpful :)
Here are screenshots of the before and after for a switch:
Have the same problem. Adding fields to the widget seems to be ok, but the next time I open the widget settings, all field data is gone (not displayed).
Home Assistant Android app version(s): 2023.3.0-full
Android version(s): 13
Device model(s): Pixel 4a
Home Assistant version: Home Assistant 2023.4.5 Supervisor 2023.04.0 Operating System 10.0 Frontend 20230411.1 - latest
Last working Home Assistant release (if known): Unknown, but pretty sure this worked fine until the latest app update
Description of problem, include YAML if issue is related to notifications: I have many Service Button Widgets, these all appear to have stopped working. On closer inspection, when editing the widget, the Entity ID and any field data has been removed. If I create a new Service Button Widget, fill in the Service and Entity ID and click the Update Widget button, all appears to be OK. However, clicking the button does not work. If I then edit the button the Entity ID is blank and any other data fields associated to that Entity are also blank. I have cleared all cache and data for the app. Also removed/reinstalled with the same results. I am picking the Entity ID etc from the pre-populated list, so this is not a typo on my part. Entity State buttons appear to be fine, it is just the Service Buttons that are not working for me. Any ideas? Is this a bug?