From ac0ef6c298a93215657cdabc5db4a2353b15291e Mon Sep 17 00:00:00 2001 From: Byte09 <> Date: Mon, 16 Dec 2019 17:41:32 +0000 Subject: [PATCH] 98_MSwitch.pm: Fixed access to eventhistory git-svn-id: https://svn.fhem.de/fhem/trunk@20765 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_MSwitch.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/98_MSwitch.pm b/fhem/FHEM/98_MSwitch.pm index 9155562e4..62d57693b 100644 --- a/fhem/FHEM/98_MSwitch.pm +++ b/fhem/FHEM/98_MSwitch.pm @@ -79,7 +79,7 @@ else { if ( $preconf && $preconf ne "" ) { $preconf = "MSwitch_preconf:" . $preconf; } - + my $autoupdate = 'off'; #off/on my $version = '2.92'; my $vupdate = 'V2.00'; # versionsnummer der datenstruktur . änderung der nummer löst MSwitch_VUpdate aus . @@ -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."'";