Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WearOS - Ewelink addon switches: Unable to find referenced entities switch.xxx #1954

Closed
peterterbe opened this issue Nov 22, 2021 · 10 comments
Closed
Labels
bug Something isn't working Wear OS

Comments

@peterterbe
Copy link

Home Assistant Android version: beta-1716-40e7907-full
Home Assistant Wear OS version: beta-1716-40e7907
Android version: 11
Wear OS version: 3
Phone model: Oneplus Nord
Watch model: Samsung Galaxy Watch 4
Last working Home Assistant release (if known): None

Description of problem:

Selecting an Ewelink Addon entity in the WearOS app doesn't do anything but a logevent:

WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities switch.1000a403aa

If I enable toast it shows the message eg: "Front yard lamps was selected" but the selection does nothing just the log message.
Front yard lamp is switch.1000a403aa and I have tried with several other entities all with the same result. These entities are mainly coming from the Ewelink addon.
My only switch that is not from ewelink is the Synology NAS Home mode. That is working perfectly and ewelink switches working from the android phone version, too.

Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):


Screenshot of problem:

Additional information:

@peterterbe peterterbe added the bug Something isn't working label Nov 22, 2021
@dshokouhi
Copy link
Member

well does that entity exist in the states tab? I know nothing about the ewelink add-on but it seems it is not providing valid entities due to the HA side error. All the app does is request HA to send us a list of entities and then we execute it, nothing special.

@dshokouhi
Copy link
Member

Looks like its a known issue, are you on the latest version of the add-on?

CoolKit-Technologies/ha-addon#21

@peterterbe
Copy link
Author

What do you mean by the States tab? I can see it under Configuration/Entities. Its settings says it does not have a unique ID therefore its settings cannot be managed from the UI.
CoolKit-Technologies/ha-addon#21 may be related but I can use these switches from HA web interface, mobile app, and I can add them to Lovelace, etc

@dshokouhi
Copy link
Member

The switches may work but the error for the entity ID needs to be solved. Are you on the latest version of the add-on as the linked issue mentions? I am not sure htis is an error the app can solve as the HA server gives us the entity ID and we just try to execute it.

States tab is located inside Developer Tools section, its where all entities added to your server are shown

https://www.home-assistant.io/docs/tools/dev-tools/#states

@peterterbe
Copy link
Author

peterterbe commented Nov 23, 2021

Ok, I have found it, thanks! It's listed but I cannot set the state. I try to change state: 'off' to state: 'on' and the lamp is not lighting up but its state property under the Current entities table State column shows the state I set.

@dshokouhi
Copy link
Member

The states tab does not control the device like you think it will, it just overrides the state as it mentions in the link :)

Did you check the add-on is up to date with at least the version mentioned in the linked ticket? Have you tried the entity with another app feature like Android 11 device control or widgets?

@peterterbe
Copy link
Author

Yes, I'm on version 1.2.3 of the addon. It seems like coolkit issue#21 was fixed in version 1.2.2.
The entity can be used from the Android 11 device control screen but the HA Service button widget throws the same warning into the log as the Wear OS app and doesn't switch the device. This is the case with the Home slide app I've tried before, too. It checks, log event shows up without actual toggle of the device.

@dshokouhi
Copy link
Member

dshokouhi commented Nov 24, 2021

Yes, I'm on version 1.2.3 of the addon. It seems like coolkit issue#21 was fixed in version 1.2.2.
The entity can be used from the Android 11 device control screen but the HA Service button widget throws the same warning into the log as the Wear OS app and doesn't switch the device. This is the case with the Home slide app I've tried before, too. It checks, log event shows up without actual toggle of the device.

If you make a widget for turn_on or turn_off service call on the switch does it work as expected?

Edit: I would also check this by sending a service call using developer tools as well

@peterterbe
Copy link
Author

peterterbe commented Nov 25, 2021

The above error message has been created on each retry (even if the switch was successful).

  • I can turn the switch on and off from:
    • Web UI
    • Developer tools/Services Switch: Turn on and Turn off
    • Android app
    • Android 11 Device control screen
    • Android widget with Service Switch.Turn_on/Switch.Turn_off
  • I can NOT switch them on and off from:
    • Developer tools/Services Switch: Toggle
    • Android widget with Service Switch.Toggle
    • Wear OS app

So basically it is not working when I call the toggle service regardless of the user interface, even from the Developer tools.

@dshokouhi
Copy link
Member

So basically it is not working when I call the toggle service regardless of the user interface, even from the Developer tools.

That is a bug with the add-on itself and not a bug with the app because it is happening from the HA frontend. I suggest you file an issue with the add-on creator to see if switches created from it can use the switch.toggle service call as that is what the app uses in some areas.

https://developers.home-assistant.io/docs/core/entity/switch#toggle

Closing this issue for now but do let us know the outcome of the issue you open there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Wear OS
Projects
None yet
Development

No branches or pull requests

2 participants