From 32a5a7d2071650f7a190d1a93dd109d29ab68e4a Mon Sep 17 00:00:00 2001 From: Beta-User <> Date: Thu, 19 Mar 2020 11:07:03 +0000 Subject: [PATCH] 98_RandomTimer: add optional variations parameter git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@21449 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- CHANGED | 2 + FHEM/98_RandomTimer.pm | 51 +++++++++++++++++++++----- FHEM/lib/AttrTemplate/httpmod.template | 2 +- 3 files changed, 44 insertions(+), 11 deletions(-) diff --git a/CHANGED b/CHANGED index 0e15e7da0..42ac2f141 100644 --- a/CHANGED +++ b/CHANGED @@ -1,5 +1,7 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: 98_RandomTimer: Add "variations" parameter to further randomize + possible switching times - feature: 77_SMAEM: add define option - bugfix: 98_WeekdayTimer: prevent crashes related to weekprofile changes - bugfix: 93_DbRep: fix user rights check for index operation diff --git a/FHEM/98_RandomTimer.pm b/FHEM/98_RandomTimer.pm index 7017dee41..cbaf14286 100644 --- a/FHEM/98_RandomTimer.pm +++ b/FHEM/98_RandomTimer.pm @@ -77,10 +77,10 @@ sub RandomTimer_Define($$) { my ($hash, $def) = @_; RemoveInternalTimer($hash); - my ($name, $type, $timespec_start, $device, $timespec_stop, $timeToSwitch) = + my ($name, $type, $timespec_start, $device, $timespec_stop, $timeToSwitch, $variation) = split("[ \t][ \t]*", $def); - return "wrong syntax: define RandomTimer " + return "wrong syntax: define RandomTimer []" if(!defined $timeToSwitch); return "Wrong timespec_start <$timespec_start>, use \"[+][*]