From f62ecf7342d8a09b7f12e513d80d5a34ff4ca472 Mon Sep 17 00:00:00 2001 From: wherzig <> Date: Mon, 25 Jan 2016 21:48:24 +0000 Subject: [PATCH] 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 --- fhem/FHEM/46_TRX_LIGHT.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/46_TRX_LIGHT.pm b/fhem/FHEM/46_TRX_LIGHT.pm index 304dadd88..23e74e8af 100755 --- a/fhem/FHEM/46_TRX_LIGHT.pm +++ b/fhem/FHEM/46_TRX_LIGHT.pm @@ -159,7 +159,7 @@ TRX_LIGHT_Initialize($) $hash->{DefFn} = "TRX_LIGHT_Define"; $hash->{UndefFn} = "TRX_LIGHT_Undef"; $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; } @@ -509,7 +509,9 @@ TRX_LIGHT_Set($@) 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(); $hash->{CHANGED}[0] = $command_state;