mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-17 05:16:02 +00:00
30_pilight_contact: fix protocol names in big and lower case
git-svn-id: https://svn.fhem.de/fhem/trunk@14104 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1362d4f8da
commit
b382967ea1
@ -50,13 +50,13 @@ sub pilight_contact_Define($$)
|
||||
$unit = $a[4] if (@a == 5);
|
||||
|
||||
$hash->{STATE} = "defined";
|
||||
$hash->{PROTOCOL} = lc($protocol);
|
||||
$hash->{PROTOCOL} = $protocol;
|
||||
$hash->{ID} = $id;
|
||||
$hash->{UNIT} = $unit;
|
||||
|
||||
#$attr{$me}{verbose} = 5;
|
||||
|
||||
$modules{pilight_contact}{defptr}{lc($protocol)}{$me} = $hash;
|
||||
$modules{pilight_contact}{defptr}{$protocol}{$me} = $hash;
|
||||
AssignIoPort($hash);
|
||||
return undef;
|
||||
}
|
||||
@ -82,12 +82,14 @@ sub pilight_contact_Parse($$)
|
||||
|
||||
Log3 $backend, 4, "pilight_contact_Parse ($backend): RCV -> $rmsg";
|
||||
|
||||
Log3 $backend, 4, "pilight_contact_Parse ($backend): RCV -> $rmsg";
|
||||
|
||||
my ($dev,$protocol,$id,$unit,$state,@args) = split(",",$rmsg);
|
||||
return () if($dev ne "PICONTACT");
|
||||
|
||||
my $chash;
|
||||
foreach my $n (keys %{ $modules{pilight_contact}{defptr}{lc($protocol)} }) {
|
||||
my $lh = $modules{pilight_contact}{defptr}{$protocol}{$n};
|
||||
foreach my $n (keys %{ $modules{pilight_contact}{defptr}{$protocol} }) {
|
||||
my $lh = $modules{pilight_contact}{defptr}{$protocol}{$n};
|
||||
next if ( !defined($lh->{ID}) );
|
||||
if ($lh->{ID} eq $id) {
|
||||
if (defined($lh->{UNIT})) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user