mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
98_MSwitch.pm:Fix - add reading "last_activation_by"
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@18870 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d5d39acecb
commit
19cc6312a0
@ -83,7 +83,7 @@ if ( $preconf && $preconf ne "" ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $autoupdate = 'off'; #off/on
|
my $autoupdate = 'off'; #off/on
|
||||||
my $version = '2.11';
|
my $version = '2.12';
|
||||||
my $vupdate = 'V2.00'
|
my $vupdate = 'V2.00'
|
||||||
; # versionsnummer der datenstruktur . änderung der nummer löst MSwitch_VUpdate aus .
|
; # versionsnummer der datenstruktur . änderung der nummer löst MSwitch_VUpdate aus .
|
||||||
my $savecount = 30
|
my $savecount = 30
|
||||||
@ -1628,12 +1628,12 @@ MSwitch_Exec_Notif( $hash, 'on', 'nocheck', '', 0 );
|
|||||||
|
|
||||||
#neu ausführung on/off
|
#neu ausführung on/off
|
||||||
if ( $cmd eq "off" || $cmd eq "on" ) {
|
if ( $cmd eq "off" || $cmd eq "on" ) {
|
||||||
|
|
||||||
### neu
|
### neu
|
||||||
if ( $delaymode eq '1' ) {
|
if ( $delaymode eq '1' ) {
|
||||||
MSwitch_Delete_Delay( $hash, $name );
|
MSwitch_Delete_Delay( $hash, $name );
|
||||||
}
|
}
|
||||||
############
|
############
|
||||||
|
readingsSingleUpdate( $hash, "last_activation_by", 'manual', $showevents );
|
||||||
# ausführen des off befehls
|
# ausführen des off befehls
|
||||||
my $zweig = 'nicht definiert';
|
my $zweig = 'nicht definiert';
|
||||||
$zweig = "cmd1" if $cmd eq "on";
|
$zweig = "cmd1" if $cmd eq "on";
|
||||||
@ -2540,12 +2540,11 @@ sub MSwitch_Notify($$) {
|
|||||||
$incommingdevice = $dev_hash->{NAME}; # aufrufendes device
|
$incommingdevice = $dev_hash->{NAME}; # aufrufendes device
|
||||||
}
|
}
|
||||||
|
|
||||||
#readingsSingleUpdate( $own_hash, "trigdev", 'vor erste ', 1 ); # nur zu testzwecken
|
|
||||||
if ( !$events && $own_hash->{helper}{testevent_device} ne 'Logfile' ) {
|
if ( !$events && $own_hash->{helper}{testevent_device} ne 'Logfile' ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#readingsSingleUpdate( $own_hash, "trigdev1", 'nach erste ', 1 ); # nur zu testzwecken
|
readingsSingleUpdate( $own_hash, "last_activation_by", 'event', $showevents );
|
||||||
|
|
||||||
my $triggerdevice =
|
my $triggerdevice =
|
||||||
ReadingsVal( $ownName, 'Trigger_device', '' ); # Triggerdevice
|
ReadingsVal( $ownName, 'Trigger_device', '' ); # Triggerdevice
|
||||||
@ -7656,7 +7655,7 @@ sub MSwitch_Execute_Timer($) {
|
|||||||
my $hash = $defs{$Name};
|
my $hash = $defs{$Name};
|
||||||
return "" if ( IsDisabled($Name) );
|
return "" if ( IsDisabled($Name) );
|
||||||
my @string = split( /ID/, $param );
|
my @string = split( /ID/, $param );
|
||||||
|
my $showevents = AttrVal( $Name, "MSwitch_generate_Events", 1 );
|
||||||
$param = $string[0];
|
$param = $string[0];
|
||||||
|
|
||||||
my $execid = 0;
|
my $execid = 0;
|
||||||
@ -7674,6 +7673,8 @@ sub MSwitch_Execute_Timer($) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readingsSingleUpdate( $hash, "last_activation_by", 'timer', $showevents );
|
||||||
|
|
||||||
if ( AttrVal( $Name, 'MSwitch_RandomNumber', '' ) ne '' ) {
|
if ( AttrVal( $Name, 'MSwitch_RandomNumber', '' ) ne '' ) {
|
||||||
MSwitch_Createnumber1($hash);
|
MSwitch_Createnumber1($hash);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user