home-assistant / android

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

Entity field not proposed when trying to create a widget for a switch #4700

Open brenard opened 2 days ago

brenard commented 2 days ago

Home Assistant Android app version(s): 2024.9.5-full (from play store)

Android version(s): 14

Device model(s): Redmi Note 13 Pro+ 5G

Home Assistant version: 2024.10.1

Last working Home Assistant release (if known): I don't known

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

When trying to create a widget for a switch entity, after selecting switch.toggle in the Action field, the Entity ID field is not displayed and I can't create my widget. Same problem for switch.turn_on and switch.turn_off actions, but no problem with light.toggle for instance.

Companion App Logs:

Screenshot or video of problem:

Screenshot_2024-10-06-08-55-58-676_io homeassistant companion android

Additional information:

dshokouhi commented 1 day ago

Do you have actual switch entities to control? Can you tell us now about them like what integration they come from? I am unable to reproduce, the issue may lie in the entities or integration providing them so we need more information to continue.

Screenshot_20241006-091658.png

brenard commented 1 day ago

Do you have actual switch entities to control? Can you tell us now about them like what integration they come from?

Yes, a lot from many different integrations (MQTT, ESPHome, Frigate, ZHA,...).

I am unable to reproduce, the issue may lie in the entities or integration providing them so we need more information to continue. I'm reproduce the same bug on a Samsung S23 ultra (Android 14 with same version of Android Companion App and same server).

What I could provide to you to help to understand this bug?

dshokouhi commented 1 day ago

What I could provide to you to help to understand this bug?

the companion app logs that were not included in the bug would be a great place to start please.

settings > companion app > troubleshooting > show and share logs

please reproduce the issue and grab the logs so we can see, you can mask GPS and your URLs in the logs

jpelgrom commented 1 day ago

To clarify: does it suggest switch.toggle while typing the action? Or do you have to manually type the action and doesn't it suggest anything at all?

brenard commented 1 day ago

To clarify: does it suggest switch.toggle while typing the action? Or do you have to manually type the action and doesn't it suggest anything at all?

I started to tip and switch.toggle (and turn on/off) is proposed.

I attach logs: homeassistant_companion_log_9-6-2024_21-9-34.txt

dshokouhi commented 1 day ago

interesting, i dont see an error around entity retrieval but sometihng did complain about an empty string. Do you see the same issue if you create a entity state widget? What about in device controls do you see your switches in there? I would expect both of those features also wont show the switches in question.

brenard commented 1 day ago

interesting, i dont see an error around entity retrieval but sometihng did complain about an empty string. Do you see the same issue if you create a entity state widget? What about in device controls do you see your switches in there? I would expect both of those features also wont show the switches in question.

When trying to create an entity status widget, all my switches are proposed and can select any of them without problem. With this type of widget, I also can control my switches when I chose toggle as action.

Screenshot_2024-10-07-01-56-13-945_io homeassistant companion android

This problem seem only appear when a I try to create a action button widget.

brenard commented 1 day ago

Furthermore, on the Samsung S23, I already have action button widgets previously created that control some of my switches without problem, but I can't create new ones.