]> git.basschouten.com Git - openhab-addons.git/commitdiff
Store active route location in dedicated fields (#16032)
authorKai Kreuzer <kai@openhab.org>
Sun, 10 Dec 2023 09:36:24 +0000 (10:36 +0100)
committerGitHub <noreply@github.com>
Sun, 10 Dec 2023 09:36:24 +0000 (10:36 +0100)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
bundles/org.openhab.binding.tesla/src/main/java/org/openhab/binding/tesla/internal/TeslaChannelSelectorProxy.java

index 8b0bec3bad44973a8428d81b5c7a67707bf5b113..a3a7066ec2d1f6133ed7cd4bd6c219cdfddc3035 100644 (file)
@@ -49,16 +49,16 @@ public class TeslaChannelSelectorProxy {
         AR_LATITUDE("active_route_latitude", "destinationlocation", DecimalType.class, false) {
             @Override
             public State getState(String s, TeslaChannelSelectorProxy proxy, Map<String, String> properties) {
-                proxy.latitude = s;
-                return new PointType(new StringType(proxy.latitude), new StringType(proxy.longitude),
+                proxy.arLatitude = s;
+                return new PointType(new StringType(proxy.arLatitude), new StringType(proxy.arLongitude),
                         new StringType(proxy.elevation));
             }
         },
         AR_LONGITUDE("active_route_longitude", "destinationlocation", DecimalType.class, false) {
             @Override
             public State getState(String s, TeslaChannelSelectorProxy proxy, Map<String, String> properties) {
-                proxy.longitude = s;
-                return new PointType(new StringType(proxy.latitude), new StringType(proxy.longitude),
+                proxy.arLongitude = s;
+                return new PointType(new StringType(proxy.arLatitude), new StringType(proxy.arLongitude),
                         new StringType(proxy.elevation));
             }
         },
@@ -1138,6 +1138,8 @@ public class TeslaChannelSelectorProxy {
     public String elevation = "0";
     public String nativeLatitude = "0";
     public String nativeLongitude = "0";
+    public String arLatitude = "0";
+    public String arLongitude = "0";
 
     public State getState(String s, TeslaChannelSelector selector, Map<String, String> properties) {
         return selector.getState(s, this, properties);