2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 07:24:21 +00:00

24_TPLinkHS110: Fixed division by zero error

git-svn-id: https://svn.fhem.de/fhem/trunk@12727 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
vsauer 2016-12-08 15:27:01 +00:00
parent 007b1ed63b
commit ca8c906635

View File

@ -165,7 +165,7 @@ sub TPLinkHS110_Get($$)
my $count=1;
$count = @{$json->{'emeter'}->{'get_daystat'}->{'day_list'}};
readingsBulkUpdate($hash, "monthly_total", $total);
readingsBulkUpdate($hash, "daily_average", $total/$count);
if ($count) { readingsBulkUpdate($hash, "daily_average", $total/$count)};
1;
} or do {
Log3 $hash, 3, "TPLinkHS110: $name json-decoding failed. Problem decoding getting statistical data";