diff --git a/fhem/FHEM/98_RandomTimer.pm b/fhem/FHEM/98_RandomTimer.pm index e086d02e1..bfde50042 100644 --- a/fhem/FHEM/98_RandomTimer.pm +++ b/fhem/FHEM/98_RandomTimer.pm @@ -80,17 +80,16 @@ sub RandomTimer_Define($$) get_switchmode($hash); - $hash->{NAME} = $name; - $hash->{TIMESPEC} = $timespec_start; - $hash->{TSPEC} = $tspec; - $hash->{DEVICE} = $device; - $hash->{STOPTIME} = $timespec_stop; - $hash->{TIMETOSWITCH} = $timeToSwitch; - $hash->{REP} = $rep; - $hash->{S_REP} = $srep; - $hash->{REL} = $rel; - $hash->{S_REL} = $srel; - $hash->{COMMAND} = "off"; + $hash->{NAME} = $name; + $hash->{DEVICE} = $device; + $hash->{TIMESPEC_START} = $timespec_start; + $hash->{TIMESPEC_STOP} = $timespec_stop; + $hash->{TIMETOSWITCH} = $timeToSwitch; + $hash->{REP} = $rep; + $hash->{REL} = $rel; + $hash->{S_REP} = $srep; + $hash->{S_REL} = $srel; + $hash->{COMMAND} = "off"; delete $hash->{STARTTIME}; delete $hash->{ABSCHALTZEIT}; @@ -106,7 +105,12 @@ sub RandomTimer_Define($$) sub RandomTimer_ExecRepeater($) { my ($hash) = @_; - my $tspec = $hash->{TSPEC}; + my $timespec_start = $hash->{TIMESPEC_START}; + + return "Wrong timespec_start <$timespec_start>, use \"[+][*]