2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-25 03:39:21 +00:00

98_MSwitch.pm: Fixed access to eventhistory

git-svn-id: https://svn.fhem.de/fhem/trunk@20765 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Byte09 2019-12-16 17:41:32 +00:00
parent 76c4c4a819
commit ac0ef6c298

View File

@ -9182,6 +9182,7 @@ m/(.*?)(\[\[[a-zA-Z][a-zA-Z0-9_]{0,30}:[a-zA-Z0-9_]{0,30}\]-\[[a-zA-Z][a-zA-Z0-9
if ( $testarg =~ '.*:h\d{1,3}' )
{
# historyformatierung erkannt - auswerten über sub
# in der regex evtl auf zeilenende definieren
$newargarray[$count] = MSwitch_Checkcond_history( $args, $name );
@ -9404,7 +9405,7 @@ foreach $seq ( sort{$b <=> $a} keys %{$log} )
{
my @historyevent = split( /:/, $hash->{helper}{eventlog}{$seq} );
$hash->{helper}{history}{event}{$x}{EVENT} = $historyevent[1].":".$historyevent[2];
$hash->{helper}{history}{event}{$x}{EVFULL} = $hash->{helper}{eventlog}{$seq};
$hash->{helper}{history}{event}{$x}{EVTFULL} = $hash->{helper}{eventlog}{$seq};
$hash->{helper}{history}{event}{$x}{EVTPART1} = $historyevent[0];
$hash->{helper}{history}{event}{$x}{EVTPART2} = $historyevent[1];
$hash->{helper}{history}{event}{$x}{EVTPART3} = $historyevent[2];
@ -9418,6 +9419,8 @@ my $historynumber = $historysplit[1];
#$historynumber =~ s/[0-9]+//gs;
$historynumber =~ s/[a-z]+//gs;
# den letzten inhalt ernittel ( anzahl im array )
my $inhalt = $hash->{helper}{history}{event}{$historynumber}{$historysplit[0]}; #????
$return ="'".$inhalt."'";