2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-07 19:04:20 +00:00

46_TRX_LIGHT.pm: repeat for sending. Thx to dero

git-svn-id: https://svn.fhem.de/fhem/trunk@10636 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
wherzig 2016-01-25 21:48:24 +00:00
parent 5e5e8b8699
commit f62ecf7342

View File

@ -159,7 +159,7 @@ TRX_LIGHT_Initialize($)
$hash->{DefFn} = "TRX_LIGHT_Define"; $hash->{DefFn} = "TRX_LIGHT_Define";
$hash->{UndefFn} = "TRX_LIGHT_Undef"; $hash->{UndefFn} = "TRX_LIGHT_Undef";
$hash->{ParseFn} = "TRX_LIGHT_Parse"; $hash->{ParseFn} = "TRX_LIGHT_Parse";
$hash->{AttrList} = "IODev ignore:1,0 do_not_notify:1,0 ". $hash->{AttrList} = "IODev ignore:1,0 do_not_notify:1,0 repeat ".
$readingFnAttributes; $readingFnAttributes;
} }
@ -509,7 +509,9 @@ TRX_LIGHT_Set($@)
return "No set implemented for $device_type . Unknown protocol type"; return "No set implemented for $device_type . Unknown protocol type";
} }
IOWrite($hash, $hex_prefix, $hex_command); for (my $repeat = $attr{$name}{repeat} || 1; $repeat >= 1; $repeat = $repeat - 1) {
IOWrite($hash, $hex_prefix, $hex_command);
}
my $tn = TimeNow(); my $tn = TimeNow();
$hash->{CHANGED}[0] = $command_state; $hash->{CHANGED}[0] = $command_state;