mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
44_TEK603: added usable level in percent
git-svn-id: https://svn.fhem.de/fhem/trunk@11877 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f101c69eba
commit
509d8b7f7f
@ -1,5 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- feature: 44_TEK603: added usable level in percent
|
||||
- added: 38_netatmo: exchanged for completely new module
|
||||
- feature: 98_DLNARenderer: Support players which require DIDL-Lite
|
||||
- bugfix: 73_km200: Bugfix for double and triple downloads
|
||||
|
@ -176,14 +176,18 @@ sub TEK603_read($) {
|
||||
|
||||
return '' if($temp eq "-40.00" && $Ullage eq "0"); # TankLevel=NO_DATA
|
||||
|
||||
# Calculations
|
||||
my $RemainingUsablePercent = round($RemainingUsableLevel / $TotalUsableCapacity * 100,01);
|
||||
|
||||
#Log3 $name, 5, $hash->{buffer};
|
||||
Log3 $name, 5, "Time:$time Temp:$temp Ullage:$Ullage RemainingUsableLevel:$RemainingUsableLevel TotalUsableCapacity:$TotalUsableCapacity";
|
||||
Log3 $name, 5, "Time:$time Temp:$temp Ullage:$Ullage RemainingUsableLevel:$RemainingUsableLevel RemainingUsablePercent:$RemainingUsablePercent TotalUsableCapacity:$TotalUsableCapacity";
|
||||
|
||||
readingsBeginUpdate($hash);
|
||||
readingsBulkUpdate($hash, "Time", $time);
|
||||
readingsBulkUpdate($hash, "Temperature", $temp);
|
||||
readingsBulkUpdate($hash, "Ullage", $Ullage);
|
||||
readingsBulkUpdate($hash, "RemainingUsableLevel", $RemainingUsableLevel);
|
||||
readingsBulkUpdate($hash, "RemainingUsablePercent", $RemainingUsablePercent);
|
||||
readingsBulkUpdate($hash, "TotalUsableCapacity", $TotalUsableCapacity);
|
||||
readingsEndUpdate($hash, 1);
|
||||
}
|
||||
@ -250,6 +254,8 @@ sub TEK603_reconnect($) {
|
||||
Sensor Measured Ullage</li>
|
||||
<li>RemainingUsableLevel<br />
|
||||
This is the usable level, with deductions due to the sensor offset and outlet height. (Liters)</li>
|
||||
<li>RemainingUsablePercent<br />
|
||||
This is the usable level in percent (calculated from RemainingUsableLevel and TotalUsableCapacity)</li>
|
||||
<li>TotalUsableCapacity<br />
|
||||
This is the usable volume, with deductions due to the sensor offset and outlet height. (Liters)</li>
|
||||
</ul><br />
|
||||
@ -261,5 +267,3 @@ sub TEK603_reconnect($) {
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user