mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Simplify DateTimeType handling for Millheat
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
parent
bad29eb653
commit
d001636a5f
@ -420,7 +420,7 @@ public class MillheatAccountHandler extends BaseBridgeHandler {
|
||||
try {
|
||||
switch (property) {
|
||||
case SetHolidayParameterRequest.PROP_START: {
|
||||
long epoch = ((DateTimeType) command).getZonedDateTime().toEpochSecond();
|
||||
long epoch = ((DateTimeType) command).getInstant().getEpochSecond();
|
||||
SetHolidayParameterRequest req = new SetHolidayParameterRequest(home.getId(), home.getTimezone(),
|
||||
SetHolidayParameterRequest.PROP_START, epoch);
|
||||
if (sendLoggedInRequest(req, SetHolidayParameterResponse.class).isSuccess()) {
|
||||
@ -429,7 +429,7 @@ public class MillheatAccountHandler extends BaseBridgeHandler {
|
||||
break;
|
||||
}
|
||||
case SetHolidayParameterRequest.PROP_END: {
|
||||
long epoch = ((DateTimeType) command).getZonedDateTime().toEpochSecond();
|
||||
long epoch = ((DateTimeType) command).getInstant().getEpochSecond();
|
||||
SetHolidayParameterRequest req = new SetHolidayParameterRequest(home.getId(), home.getTimezone(),
|
||||
SetHolidayParameterRequest.PROP_END, epoch);
|
||||
if (sendLoggedInRequest(req, SetHolidayParameterResponse.class).isSuccess()) {
|
||||
|
Loading…
Reference in New Issue
Block a user