2026-04-01_12:26:47 Jet Diesel: 2.38
2026-04-01_12:26:47 Jet SuperE5: 2.22
2026-04-01_12:36:53 Real Diesel: 2.38
2026-04-01_12:36:53 Real SuperE5: 2.22
2026-04-01_12:45:57 Heizoelpreis Heizoelpreis: 139,23
2026-04-01_12:51:53 Globus Diesel: 2.32
2026-04-01_12:51:53 Globus SuperE5: 2.19
2026-04-01_13:01:48 Jet Diesel: 2.35
2026-04-01_13:01:48 Jet SuperE5: 2.20
2026-04-01_13:21:48 Real Diesel: 2.35
2026-04-01_13:21:48 Real SuperE5: 2.20Zitat...sehe aber nicht, dass das "Problem" alleine durch die hohe Dynamik kommt.Vielleicht siehst du ja mehr als ich, vier Augen sehen bekanntlich mehr als zwei.
if ($lotype eq 'double') {
....
if ($scm eq 'staple') {
.....
}
else {
if ($hfcg->{$i}{beam1} >= $hfcg->{$i}{beam2}) {
$z2 = $hfcg->{$i}{beam1};
$z3 = $hfcg->{$i}{beam2};
$titz2 = qq/title="$hfcg->{0}{beam1txt}"/;
$titz3 = qq/title="$hfcg->{0}{beam2txt}"/;
}
else { # tauschen, Betrag Beam1 < Betrag Beam2
$z2 = $hfcg->{$i}{beam2};
$z3 = $hfcg->{$i}{beam1};
$titz2 = qq/title="$hfcg->{0}{beam2txt}"/;
$titz3 = qq/title="$hfcg->{0}{beam1txt}"/;
}
$mbdf = $maxVal - $z2; # Wertedifferenz abs. Maxwert und größerem Balkenwert
}
$z1 = __normBeamHeight ( { val => $mbdf, maxVal => $maxVal, height => $height, ground => 0, scalemode => 'lin' } );
$z2 = __normBeamHeight ( { val => $z2, maxVal => $maxVal, height => $height, ground => 0, scalemode => $scm } );
$z3 = __normBeamHeight ( { val => $z3, maxVal => $maxVal, height => $height, ground => 0, scalemode => $scm } );
$z2 -= $z3 if($scm eq 'lin'); # effektive Stapelhöhe, da $z2 + $z3 übereinander dargestellt wird
if ($scm eq 'log' && $z2) {
.....
}
}
sub __normBeamHeight {
my $paref = shift;
my $val = $paref->{val} // 0;
my $maxVal = $paref->{maxVal} // 0;
my $height = $paref->{height};
my $ground = $paref->{ground} // 0; # eine minimale Balkenhöhe die immer eingehalten werden soll
my $scalemode = $paref->{scalemode} // 'lin'; # lin / log / staple
my $px = $ground;
return int($px) if($maxVal <= 0); # Schutz: maxVal darf nicht 0 oder negativ sein
if ($scalemode eq 'lin' || $scalemode eq 'staple') {
$px = $ground + (($val / $maxVal) * ($height - $ground));
}
elsif ($scalemode eq 'log') {
return int($px) if($val <= 0); # Logarithmus nur für positive Werte
my $logMax = log($maxVal);
return int($px) if($logMax <= 0); # verhindert log(1)=0 oder log(<1)<0
$px = $ground + ((log($val) / $logMax) * ($height - $ground));
}
return int($px);
}
Zitat von: Moonlightkid am 01 April 2026, 11:06:27Kombination aus hue in zigbee2mqtt, FHEMMan kann die Hue in zigbee2mqtt einbinden?
Zitat von: betateilchen am 01 April 2026, 09:45:10Allerdings benötige ich ihn nicht für die Anmeldung an FHEMWEB, das müsste ich mir erstmal nachbauen.
ZitatWeil ichz nicht weiß, und wo seht das - was das Flag macht?In den Quellen, 01_FHEMWEB.pm
