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

93_DbRep: contrib 8.23.0

git-svn-id: https://svn.fhem.de/fhem/trunk@20055 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2019-08-25 08:15:10 +00:00
parent 94b181a024
commit d78a1dcfa4

View File

@ -1351,7 +1351,7 @@ sub DbRep_Notify($$) {
$event = "" if(!defined($event));
my @evl = split("[ \t][ \t]*", $event);
if($event =~ /DELETED/) {
if($event =~ /DELETED|INITIALIZED/) {
my $awdev = AttrVal($own_hash->{NAME}, "device", "");
DbRep_modAssociatedWith ($own_hash,"set",$awdev);
}
@ -10796,10 +10796,11 @@ sub DbRep_modAssociatedWith ($$$) {
my ($hash,$cmd,$awdev) = @_;
my @naw;
my @def = split("{",$hash->{DEF});
# my @def = split("{",$hash->{DEF});
# $hash->{DEF} = $def[0];
if($cmd eq "del") {
$hash->{DEF} = $def[0];
delete $hash->{HELPER}{PAW};
return;
}
@ -10818,9 +10819,7 @@ sub DbRep_modAssociatedWith ($$$) {
}
if(@naw) {
$hash->{DEF} = $def[0]." {".join(" ",@naw)."}";
} else {
$hash->{DEF} = $def[0];
$hash->{HELPER}{PAW} = join(" ",@naw);
}
return;