2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-01 06:28:32 +00:00

36_WMBus: new readings volume/unit for gas/water meters

git-svn-id: https://svn.fhem.de/fhem/trunk@8026 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
kaihs 2015-02-17 20:40:38 +00:00
parent 3c798503db
commit a3e5b6702f

View File

@ -339,6 +339,18 @@ sub WMBUS_SetDeviceSpecificReadings($$$)
readingsBulkUpdate($hash, "unit", "m³");
}
}
} elsif ($mb->{afield_type} == 3 || $mb->{afield_type} == 7) {
# general gas/water meter
my $dataBlock;
my $dataBlocks = $mb->{datablocks};
for $dataBlock ( @$dataBlocks ) {
# search for VIF_VOLUME
if ($dataBlock->{type} eq 'VIF_VOLUME') {
readingsBulkUpdate($hash, "volume", $dataBlock->{value});
readingsBulkUpdate($hash, "unit", $dataBlock->{unit});
}
}
}
}