mirror of
https://github.com/home-assistant/android
synced 2024-09-19 16:11:37 +00:00
Stop calling an endpoint that will never come. (#583)
This commit is contained in:
parent
40e16c370c
commit
885911814e
|
@ -265,25 +265,9 @@ class IntegrationRepositoryImpl @Inject constructor(
|
||||||
throw IntegrationException()
|
throw IntegrationException()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Use websocket to get panels.
|
||||||
override suspend fun getPanels(): Array<Panel> {
|
override suspend fun getPanels(): Array<Panel> {
|
||||||
val getPanelsRequest =
|
return arrayOf()
|
||||||
IntegrationRequest(
|
|
||||||
"get_panels",
|
|
||||||
null
|
|
||||||
)
|
|
||||||
var response: Array<Panel>? = null
|
|
||||||
for (it in urlRepository.getApiUrls()) {
|
|
||||||
try {
|
|
||||||
response = integrationService.getPanels(it.toHttpUrlOrNull()!!, getPanelsRequest)
|
|
||||||
} catch (e: Exception) {
|
|
||||||
// Ignore failure until we are out of URLS to try!
|
|
||||||
}
|
|
||||||
|
|
||||||
if (response !== null)
|
|
||||||
return response
|
|
||||||
}
|
|
||||||
|
|
||||||
throw IntegrationException()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun getServices(): Array<Service> {
|
override suspend fun getServices(): Array<Service> {
|
||||||
|
|
Loading…
Reference in a new issue