Simplify DateTimeType handling for Vallox MV

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen 2024-11-09 22:44:21 +01:00 committed by lsiepel
parent 77d6457017
commit d59b10a064

View File

@ -19,11 +19,9 @@ import java.math.BigDecimal;
import java.net.URI; import java.net.URI;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.time.ZonedDateTime;
import java.util.Calendar; import java.util.Calendar;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.TimeZone;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
@ -512,8 +510,8 @@ public class ValloxMVWebSocket {
updateChannel(ValloxMVBindingConstants.CHANNEL_UPTIME_HOURS, new DecimalType(iUptimeHours)); updateChannel(ValloxMVBindingConstants.CHANNEL_UPTIME_HOURS, new DecimalType(iUptimeHours));
updateChannel(ValloxMVBindingConstants.CHANNEL_UPTIME_HOURS_CURRENT, updateChannel(ValloxMVBindingConstants.CHANNEL_UPTIME_HOURS_CURRENT,
new DecimalType(iUptimeHoursCurrent)); new DecimalType(iUptimeHoursCurrent));
updateChannel(ValloxMVBindingConstants.CHANNEL_FILTER_CHANGED_DATE, new DateTimeType( updateChannel(ValloxMVBindingConstants.CHANNEL_FILTER_CHANGED_DATE,
ZonedDateTime.ofInstant(cFilterChangedDate.toInstant(), TimeZone.getDefault().toZoneId()))); new DateTimeType(cFilterChangedDate.toInstant()));
updateChannel(ValloxMVBindingConstants.CHANNEL_REMAINING_FILTER_DAYS, updateChannel(ValloxMVBindingConstants.CHANNEL_REMAINING_FILTER_DAYS,
new QuantityType<>(iRemainingTimeForFilter, Units.DAY)); new QuantityType<>(iRemainingTimeForFilter, Units.DAY));
updateChannel(ValloxMVBindingConstants.CHANNEL_EXTR_FAN_BALANCE_BASE, updateChannel(ValloxMVBindingConstants.CHANNEL_EXTR_FAN_BALANCE_BASE,