Only add next subscription if control is not null (#2812)

* Only add next subscription if control is not null

* Add one more null check for control
This commit is contained in:
Daniel Shokouhi 2022-08-29 19:50:09 -05:00 committed by GitHub
parent cfafffd27f
commit 6e647cb436
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -165,7 +165,8 @@ class HaControlsProviderService : ControlsProviderService() {
RegistriesDataHandler.getAreaForEntity(it.entityId, areaRegistry, deviceRegistry, entityRegistry),
baseUrl
)
subscriber.onNext(control)
if (control != null)
subscriber.onNext(control)
}
}
}
@ -254,7 +255,8 @@ class HaControlsProviderService : ControlsProviderService() {
baseUrl
)
}
subscriber.onNext(control)
if (control != null)
subscriber.onNext(control)
}
}