mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-29 12:34:21 +02:00
Simplify DateTimeType handling for Broadlink
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
+2
-1
@@ -16,6 +16,7 @@ import static org.openhab.binding.broadlinkthermostat.internal.BroadlinkBindingC
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.LocalTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -212,7 +213,7 @@ public class FloureonThermostatHandler extends BroadlinkBaseHandler {
|
||||
|
||||
private void handleSetTimeCommand(ChannelUID channelUID, Command command) {
|
||||
if (command instanceof DateTimeType dateTimeCommand) {
|
||||
ZonedDateTime zonedDateTime = dateTimeCommand.getZonedDateTime();
|
||||
ZonedDateTime zonedDateTime = dateTimeCommand.getZonedDateTime(ZoneId.systemDefault());
|
||||
try {
|
||||
new SetTimeCommand(tob(zonedDateTime.getHour()), tob(zonedDateTime.getMinute()),
|
||||
tob(zonedDateTime.getSecond()), tob(zonedDateTime.getDayOfWeek().getValue()))
|
||||
|
||||
Reference in New Issue
Block a user