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

ClientFactory.Initialize, how to check if connection is established ? #14

Closed
dawidn47 opened this issue Dec 22, 2020 · 1 comment
Closed

Comments

@dawidn47
Copy link

Hi, how to check if connection with Home Assistance is established correcly? Im asking because after checking with ClientFactory.IsInitialized I see true even if I set wrong ip adress of my Home Assistance.

Another question, Can I use ClientFactory.Initialize with local adress ?

e. g ClientFactory.Initialize("https://homeassistant.local:8123/", "abcd....

@qJake
Copy link
Owner

qJake commented Jan 23, 2021

The IsInitialized property only checks if you called Initialize and provided some valid entries (meaning, a valid URL and not null or something like that), it does not reach out to HA to check connectivity.

You can check connectivity by using the RootApiClient or the DiscoveryClient.

@qJake qJake closed this as completed Jan 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants