add null handling checkData
Signed-off-by: Laurent ARNAL <laurent@clae.net>pull/16355/head
parent
5cccb4f2c7
commit
d184f9abfc
|
@ -862,8 +862,16 @@ public class LinkyHandler extends BaseThingHandler {
|
|||
}
|
||||
|
||||
private void logData(IntervalReading[] ivArray, int index, String title, DateTimeFormatter dateTimeFormatter) {
|
||||
try {
|
||||
IntervalReading iv = ivArray[index];
|
||||
logger.debug("{} {} value {}", title, iv.date.format(dateTimeFormatter), iv.value);
|
||||
String date = "";
|
||||
if (iv.date != null) {
|
||||
date = iv.date.format(dateTimeFormatter);
|
||||
}
|
||||
logger.debug("{} {} value {}", title, date, iv.value);
|
||||
} catch (Exception e) {
|
||||
logger.error("error during logData", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void saveConfiguration(Configuration config) {
|
||||
|
|
Loading…
Reference in New Issue