diff --git a/CounterTable/module.php b/CounterTable/module.php
index c6e1ae7..c359579 100644
--- a/CounterTable/module.php
+++ b/CounterTable/module.php
@@ -39,41 +39,42 @@ class CounterTable extends IPSModule {
$dataoutput = "";
/// print_r($arr);
- foreach($arr as $cnt){
+ if($arr != NULL){
+ foreach($arr as $cnt){
- $cost = 0.0;
- $cost = $cnt->Monthly * $price;
- $dataoutput .= '
-
-
- |
- '.$cnt->Name.'
- |
+ $cost = 0.0;
+ $cost = $cnt->Monthly * $price;
+ $dataoutput .= '
+
- |
- '.$cnt->Total.' kWh
- |
-
-
- '.$cnt->Monthly.' kWh
- |
-
-
- '.$cnt->Weekly.' kWh
- |
-
-
- '.$cnt->Daily.' kWh
- |
-
-
- '.$cost.'€
- |
+
+ '.$cnt->Name.'
+ |
+
+
+ '.$cnt->Total.' kWh
+ |
+
+
+ '.$cnt->Monthly.' kWh
+ |
+
+
+ '.$cnt->Weekly.' kWh
+ |
+
+
+ '.$cnt->Daily.' kWh
+ |
+
+
+ '.$cost.'€
+ |
-
';
+ ';
+ }
}
-
$this->createTable($dataoutput);
/*
diff --git a/library.json b/library.json
index 212a1c4..de066fb 100644
--- a/library.json
+++ b/library.json
@@ -8,6 +8,6 @@
"date": 1491343200
},
"version": "1.0",
- "build": 7,
+ "build": 8,
"date": 0
}
\ No newline at end of file