Skip to content

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

Description

@FrankBakkerNl

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

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions