mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 07:02:02 +01:00
Simplify DateTimeType handling for Ecovacs
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
parent
7cb8bf18ed
commit
4c176a8c82
@ -14,7 +14,6 @@ package org.openhab.binding.ecovacs.internal.handler;
|
||||
|
||||
import static org.openhab.binding.ecovacs.internal.EcovacsBindingConstants.*;
|
||||
|
||||
import java.time.ZoneId;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
@ -584,8 +583,7 @@ public class EcovacsVacuumHandler extends BaseThingHandler implements EcovacsDev
|
||||
if (!cleanLogRecords.isEmpty()) {
|
||||
CleanLogRecord record = cleanLogRecords.get(0);
|
||||
|
||||
updateState(CHANNEL_ID_LAST_CLEAN_START,
|
||||
new DateTimeType(record.timestamp.toInstant().atZone(ZoneId.systemDefault())));
|
||||
updateState(CHANNEL_ID_LAST_CLEAN_START, new DateTimeType(record.timestamp.toInstant()));
|
||||
updateState(CHANNEL_ID_LAST_CLEAN_DURATION, new QuantityType<>(record.cleaningDuration, Units.SECOND));
|
||||
updateState(CHANNEL_ID_LAST_CLEAN_AREA, new QuantityType<>(record.cleanedArea, SIUnits.SQUARE_METRE));
|
||||
if (device.hasCapability(DeviceCapability.EXTENDED_CLEAN_LOG_RECORD)) {
|
||||
|
Loading…
Reference in New Issue
Block a user