[map][scale] Fix localization ()

The wrong key was used in the `cachedTransformations` map. Instead of the correctyl localized UID from the registry the provided transformation function was used.

Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
J-N-K 2023-04-17 21:33:28 +02:00 committed by GitHub
parent a0d84732a3
commit f2f0f4b402
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions
bundles
org.openhab.transform.map/src/main/java/org/openhab/transform/map/internal
org.openhab.transform.scale/src/main/java/org/openhab/transform/scale/internal

@ -81,7 +81,7 @@ public class MapTransformationService
if (!cachedTransformations.containsKey(transformation.getUID())) {
importConfiguration(transformation);
}
Properties properties = cachedTransformations.get(function);
Properties properties = cachedTransformations.get(transformation.getUID());
if (properties != null) {
String target = properties.getProperty(source);

@ -149,7 +149,7 @@ public class ScaleTransformationService
if (!cachedTransformations.containsKey(transformation.getUID())) {
importConfiguration(transformation);
}
Map<@Nullable Range, String> data = cachedTransformations.get(function);
Map<@Nullable Range, String> data = cachedTransformations.get(transformation.getUID());
if (data != null) {
String target;