mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
fix status in case of error
Signed-off-by: Laurent ARNAL <laurent@clae.net>
This commit is contained in:
parent
00c79dd12f
commit
28808d9930
@ -207,7 +207,9 @@ public class LinkyHandler extends BaseThingHandler {
|
||||
final LocalDateTime nextDayFirstTimeUpdate = now.plusDays(1).withHour(REFRESH_FIRST_HOUR_OF_DAY)
|
||||
.truncatedTo(ChronoUnit.HOURS);
|
||||
|
||||
updateStatus(ThingStatus.ONLINE);
|
||||
if (this.getThing().getStatusInfo().getStatusDetail() != ThingStatusDetail.COMMUNICATION_ERROR) {
|
||||
updateStatus(ThingStatus.ONLINE);
|
||||
}
|
||||
|
||||
refreshJob = scheduler.scheduleWithFixedDelay(this::updateData,
|
||||
ChronoUnit.MINUTES.between(now, nextDayFirstTimeUpdate) % REFRESH_INTERVAL_IN_MIN + 1,
|
||||
|
Loading…
Reference in New Issue
Block a user