2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

76_SolarForecast: possible asynchron mode for Meter & Inverter

git-svn-id: https://svn.fhem.de/fhem/trunk@29404 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2024-12-05 21:13:50 +00:00
parent cc4dfe95c9
commit a9ac0a1c14

View File

@ -5526,7 +5526,7 @@ sub Attr {
if ($init_done && $aName eq 'ctrlInterval') { if ($init_done && $aName eq 'ctrlInterval') {
_newCycTime ($hash, time, $aVal); _newCycTime ($hash, time, $aVal);
my $nct = CurrentVal ($hash, 'nextCycleTime', 0); # gespeicherte nächste CyleTime my $nct = CurrentVal ($hash, 'nextCycleTime', 0); # gespeicherte nächste CyleTime
readingsSingleUpdate ($hash, 'nextCycletime', (!$nct ? 'Manual' : FmtTime($nct)), 0); readingsSingleUpdate ($hash, 'nextCycletime', (!$nct ? 'Manual / Event-controlled' : FmtTime($nct)), 0);
return; return;
} }
} }
@ -6982,8 +6982,8 @@ sub runTask {
my ($interval, $disabled, $inactive) = controller ($name); my ($interval, $disabled, $inactive) = controller ($name);
if (!$interval) { if (!$interval) {
$hash->{MODE} = 'Manual'; $hash->{MODE} = 'Manual / Event-controlled';
storeReading ('nextCycletime', 'Manual'); storeReading ('nextCycletime', 'Manual / Event-controlled');
return; return;
} }
@ -7048,14 +7048,14 @@ sub _newCycTime {
my $interval = shift; my $interval = shift;
if (!$interval) { if (!$interval) {
$hash->{MODE} = 'Manual'; $hash->{MODE} = 'Manual / Event-controlled';
$data{$hash->{TYPE}}{$hash->{NAME}}{current}{nextCycleTime} = 0; $data{$hash->{TYPE}}{$hash->{NAME}}{current}{nextCycleTime} = 0;
storeReading ('nextCycletime', 'Manual'); storeReading ('nextCycletime', 'Manual / Event-controlled');
return; return;
} }
my $new = $t + $interval; # nächste Wiederholungszeit my $new = $t + $interval; # nächste Wiederholungszeit
$hash->{MODE} = 'Automatic - next Cycletime: '.FmtTime($new); $hash->{MODE} = 'Automatic / Event-controlled - next planned Cycletime: '.FmtTime($new);
$data{$hash->{TYPE}}{$hash->{NAME}}{current}{nextCycleTime} = $new; $data{$hash->{TYPE}}{$hash->{NAME}}{current}{nextCycleTime} = $new;
storeReading ('nextCycletime', FmtTime($new)); storeReading ('nextCycletime', FmtTime($new));