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

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@8026 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
kaihs
2015-02-17 20:40:38 +00:00
parent c8f386c9fd
commit de24f74925

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});
}
}
}
}