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:
@@ -339,6 +339,18 @@ sub WMBUS_SetDeviceSpecificReadings($$$)
|
|||||||
readingsBulkUpdate($hash, "unit", "m³");
|
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});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user