mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
78_AMConnectTools.pm: transfer version to AutomowerConnect.
git-svn-id: https://svn.fhem.de/fhem/trunk@29245 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
83345c0584
commit
acfefa5719
@ -161,7 +161,6 @@ sub Define{
|
||||
my $paw = join( ' ', devspec2array( "TYPE=AutomowerConnect" ) );
|
||||
readingsSingleUpdate( $hash, '.associatedWith', $paw, 0 );
|
||||
|
||||
|
||||
}
|
||||
|
||||
return undef;
|
||||
@ -214,6 +213,16 @@ sub Notify {
|
||||
|
||||
} elsif ( $dev_name eq 'global' && $event =~ /^(INITIALIZED|MODIFIED $name|ATTR $name disable 0|DELETEATTR $name disable)$/ ) {
|
||||
|
||||
foreach my $keyx ( devspec2array('TYPE=AutomowerConnect') ) {
|
||||
|
||||
if ( !defined( $defs{$keyx}->{VERSION_AMConnectTools} ) || defined( $defs{$keyx}->{VERSION_AMConnectTools} ) && $defs{$keyx}->{VERSION_AMConnectTools} ne $defs{AMConnectTools}->{VERSION} ) {
|
||||
|
||||
$defs{$keyx}->{VERSION_AMConnectTools} = $defs{AMConnectTools}->{VERSION}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
my $runningDevices = '';
|
||||
my @mowers = devspec2array( AttrVal( $name, 'notifiedByMowerDevices', '' ) );
|
||||
|
||||
@ -641,6 +650,12 @@ sub Delete {
|
||||
my $iam ="$type $name Delete: ";
|
||||
Log3( $name, 5, "$iam called" );
|
||||
|
||||
foreach my $keyx ( devspec2array('TYPE=AutomowerConnect') ) {
|
||||
|
||||
delete( $defs{$keyx}->{VERSION_AMConnectTools} ) if ( defined( $defs{$keyx}->{VERSION_AMConnectTools} ) );
|
||||
|
||||
}
|
||||
|
||||
my ($passResp,$passErr) = $hash->{helper}->{passObj}->setDeletePassword($name);
|
||||
Log3( $name, 1, "$iam error: $passErr" ) if ($passErr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user