2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

98_WeekdayTimer:

http://forum.fhem.de/index.php/topic,36988.msg292688.html#msg292688

git-svn-id: https://svn.fhem.de/fhem/trunk@8540 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
dietmar63 2015-05-07 18:02:35 +00:00
parent 4d344e1c62
commit 6b49e86236

View File

@ -589,7 +589,7 @@ sub WeekdayTimer_Update($) {
# ggf. Device schalten
WeekdayTimer_Device_Schalten($hash, $newParam, $tage);
my ($aktTime, $aktParameter, $nextTime, $nextParameter) =
my ($indx, $aktTime, $aktParameter, $nextTime, $nextParameter) =
WeekdayTimer_searchAktNext($hash, time()+5);
readingsBeginUpdate($hash);
@ -762,12 +762,8 @@ sub WeekdayTimer_Device_Schalten($$$) {
$command = "set @ " . $setModifier . " %";
$command = $hash->{COMMAND} if (defined $hash->{COMMAND});
$command = "{ fhem('" . $command . "') }";
$condition = WeekdayTimer_Condition ($hash, $tage);
$tageAsHash = WeekdayTimer_tageAsHash($hash, $tage);
$command = "{" . $tageAsHash . "; if " .$condition . " " . $command . "}";
my $activeTimer = WeekdayTimer_isAnActiveTimer ($hash, $tage, $newParam);
my $isHeating = $setModifier gt "";
my $aktParam = ReadingsVal($hash->{DEVICE}, $setModifier, "");
@ -779,7 +775,7 @@ sub WeekdayTimer_Device_Schalten($$$) {
Log3 $hash, 4, "[$name] aktParam:$aktParam newParam:$newParam - is $disabled_txt disabled";
#Kommando ausführen
if ($command && !$disabled && $aktParam ne $newParam) {
if ($command && !$disabled && $aktParam ne $newParam && $activeTimer) {
$newParam =~ s/:/ /g;
my %specials = ( "%NAME" => $hash->{DEVICE}, "%EVENT" => $newParam);