throw PlatformNotReady
if unable to connect
#22515
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Throw
PlatformNotReady
for when the device disconnects, or when the Home Assistant is booting and the ADB server is not ready yet.Description:
When HA is ready before my ADB server in my docker container, or if my device disconnects from the network temporarily, HA loses connection and requires a restart. Instead, I think it should throw a
PlatformNotReady
so it will retry it, and do it in a back-off manner.I tested this on my own network and it fixed my problem. I think others should benefit from this too.
Checklist:
tox
. Your PR cannot be merged unless tests passIf the code communicates with devices, web services, or third-party tools: