mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
24_TPLinkHS110: added reading daily_total
git-svn-id: https://svn.fhem.de/fhem/trunk@13052 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
67c668a44b
commit
2e5f616c19
@ -170,6 +170,9 @@ sub TPLinkHS110_Get($$)
|
|||||||
foreach my $key (sort keys @{$json->{'emeter'}->{'get_daystat'}->{'day_list'}}) {
|
foreach my $key (sort keys @{$json->{'emeter'}->{'get_daystat'}->{'day_list'}}) {
|
||||||
foreach my $key2 ($json->{'emeter'}->{'get_daystat'}->{'day_list'}[$key]) {
|
foreach my $key2 ($json->{'emeter'}->{'get_daystat'}->{'day_list'}[$key]) {
|
||||||
$total = $total+ $key2->{'energy'};
|
$total = $total+ $key2->{'energy'};
|
||||||
|
if ($key2->{'day'} == $mday) {
|
||||||
|
readingsBulkUpdate($hash, "daily_total", sprintf("%.3f", $key2->{'energy'}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
my $count=1;
|
my $count=1;
|
||||||
|
Loading…
Reference in New Issue
Block a user