这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public enum EventKeys {

public static final String CHANNEL_CHARGE = "charge";
public static final String CHANNEL_COMBINED_TEMP = "combinedtemp";
public static final String CHANNEL_EVENTSTAMP = "eventstamp";

// thing configurations
public static final String CONFIG_ALLOWWAKEUP = "allowWakeup";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import org.openhab.binding.tesla.internal.throttler.QueueChannelThrottler;
import org.openhab.binding.tesla.internal.throttler.Rate;
import org.openhab.core.io.net.http.WebSocketFactory;
import org.openhab.core.library.types.DateTimeType;
import org.openhab.core.library.types.DecimalType;
import org.openhab.core.library.types.IncreaseDecreaseType;
import org.openhab.core.library.types.OnOffType;
Expand Down Expand Up @@ -834,6 +835,7 @@ public void parseAndUpdate(String request, String payLoad, String result) {
try {
if (request != null && result != null && !"null".equals(result)) {
updateStatus(ThingStatus.ONLINE);
updateState(CHANNEL_EVENTSTAMP, new DateTimeType());
// first, update state objects
if ("queryVehicle".equals(request)) {
if (vehicle != null) {
Expand All @@ -844,8 +846,8 @@ public void parseAndUpdate(String request, String payLoad, String result) {
return;
}

if (vehicle != null && "asleep".equals(vehicle.state)) {
logger.debug("Vehicle is asleep.");
if (vehicle != null && ("asleep".equals(vehicle.state) || "offline".equals(vehicle.state))) {
logger.debug("Vehicle is {}", vehicle.state);
return;
}

Expand Down