Simplify DateTimeType handling for KM200

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
Jacob Laursen 2024-11-17 18:27:32 +01:00 committed by Ciprian Pascu
parent a2e6f2d3fc
commit d52da9fd24

View File

@ -16,6 +16,7 @@ import static org.openhab.binding.km200.internal.KM200BindingConstants.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.HashMap;
import java.util.List;
@ -675,7 +676,7 @@ public class KM200DataHandler {
break;
}
} else if (CoreItemFactory.DATETIME.equals(itemType)) {
ZonedDateTime swTime = ((DateTimeType) command).getZonedDateTime();
ZonedDateTime swTime = ((DateTimeType) command).getZonedDateTime(ZoneId.systemDefault());
KM200SwitchProgramServiceHandler sPService = ((KM200SwitchProgramServiceHandler) objParent
.getValueParameter());
if (null != sPService) {