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

Validate if integration is installed when using RegisterServiceCallBack() #942

Open
FrankBakkerNl opened this issue Sep 27, 2023 · 0 comments

Comments

@FrankBakkerNl
Copy link
Contributor

The problem

When you call RegisterServiceCallBack() while the NetDaemon integration is not installed it will fail and log an exception saying the required service is not present. It would be nice to log a clear message in this case telling the user to install the integration.

The proposed solution

Two possible solutions:

  • Whenever you can RegisterServiceCallBack(), we first check if the service is present in HA (using the webservice to retrieve all available services like we do in the codegen). Ofc we only need to do this once and can cache the result statically.
  • check for the specific error coming back from HA and log a message.

The alternatives

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant