Skip to content

Commit

Permalink
Store active route location in dedicated fields (openhab#16032)
Browse files Browse the repository at this point in the history
Signed-off-by: Kai Kreuzer <kai@openhab.org>
  • Loading branch information
kaikreuzer authored and joni1993 committed Oct 15, 2024
1 parent 502d8a7 commit ccbf623
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ public enum TeslaChannelSelector {
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));
}
},
Expand Down Expand Up @@ -1138,6 +1138,8 @@ public static TeslaChannelSelector getValueSelectorFromRESTID(String valueSelect
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);
Expand Down

0 comments on commit ccbf623

Please sign in to comment.