mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-02 06:55:26 +00:00
30_pilight_contact: fix protocols without id
git-svn-id: https://svn.fhem.de/fhem/trunk@12587 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c9079f812f
commit
77ce2cea51
@ -814,6 +814,9 @@ sub pilight_ctrl_Parse($$)
|
||||
readingsBulkUpdate($hash,"rcv_raw",$rmsg);
|
||||
readingsEndUpdate($hash, 1);
|
||||
|
||||
# some protocols have no id but unit(code) e.q. ev1527
|
||||
$id = $unit if ($id eq "" && $unit ne "");
|
||||
|
||||
$unit = "all" if ($unit eq "" && $all ne "");
|
||||
|
||||
my $protoID = -1;
|
||||
|
@ -89,7 +89,10 @@ sub pilight_contact_Parse($$)
|
||||
foreach my $n (keys %{ $modules{pilight_contact}{defptr}{lc($protocol)} }) {
|
||||
my $lh = $modules{pilight_contact}{defptr}{$protocol}{$n};
|
||||
next if ( !defined($lh->{ID}) );
|
||||
if ($lh->{ID} eq $id && $lh->{UNIT} eq $unit) {
|
||||
if ($lh->{ID} eq $id) {
|
||||
if (defined($lh->{UNIT})) {
|
||||
next if ($lh->{UNIT} ne $unit);
|
||||
}
|
||||
$chash = $lh;
|
||||
last;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user