mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01:00
Fix GenericThingProvider (#3779)
When things from multiple handler factories are provisioned from the same file the internal thing map was not properly updated. Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
parent
9cc7b58ac0
commit
b426cccf9c
@ -614,9 +614,9 @@ class GenericThingProvider extends AbstractProviderLazyNullness<Thing> implement
|
|||||||
createThing(newThings, factory)
|
createThing(newThings, factory)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
thingsMap.put(modelName, newThings)
|
|
||||||
|
|
||||||
newThings.forEach [ newThing |
|
newThings.forEach [ newThing |
|
||||||
|
thingsMap.get(modelName).add(newThing)
|
||||||
val oldThing = oldThings.findFirst[it.UID == newThing.UID]
|
val oldThing = oldThings.findFirst[it.UID == newThing.UID]
|
||||||
if (oldThing !== null) {
|
if (oldThing !== null) {
|
||||||
if (!ThingHelper.equals(oldThing, newThing)) {
|
if (!ThingHelper.equals(oldThing, newThing)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user