mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 23:06:37 +00:00
- some improvements to compute state active
- some improvements to debug funktionality with verbose in case of disabled attribute git-svn-id: https://svn.fhem.de/fhem/trunk@4330 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d80cdc67de
commit
d93f4c0c6a
@ -320,8 +320,9 @@ sub Heating_Control_Update($)
|
||||
|
||||
my $active = 1;
|
||||
if (defined $hash->{helper}{CONDITION}) {
|
||||
$active = eval ($hash->{helper}{CONDITION});
|
||||
$active = AnalyzeCommandChain(undef, "{".$hash->{helper}{CONDITION}."}");
|
||||
}
|
||||
|
||||
readingsBeginUpdate($hash);
|
||||
readingsBulkUpdate ($hash, "nextUpdate", strftime("%d.%m.%Y %H:%M:%S",localtime($nextSwitch)));
|
||||
readingsBulkUpdate ($hash, "nextValue", $nextParam);
|
||||
@ -450,13 +451,17 @@ sub Heating_Control_Device_Schalten($$$$) {
|
||||
|
||||
Log3 $hash, 4, $mod .strftime('%d.%m.%Y %H:%M:%S',localtime($nowSwitch))." ; aktParam: $aktParam ; newParam: $newParam";
|
||||
|
||||
my $disabled = AttrVal($hash->{NAME}, "disable", 0);
|
||||
my $disabled_txt = $disabled ? " " : " not";
|
||||
Log3 $hash, 4, $mod . "is$disabled_txt disabled";
|
||||
|
||||
#Kommando ausführen
|
||||
my $secondsSinceSwitch = $nowSwitch - $now;
|
||||
if (defined $hash->{helper}{COMMAND} || ($nowSwitch gt "" && $aktParam ne $newParam )) {
|
||||
if (!$setModifier && $secondsSinceSwitch < -60) {
|
||||
Log3 $hash, 5, $mod."no switch in the yesterdays because of the devices type.";
|
||||
} else {
|
||||
if ($command && AttrVal($hash->{NAME}, "disable", 0) == 0) {
|
||||
if ($command && !$disabled) {
|
||||
$newParam =~ s/:/ /g;
|
||||
$command =~ s/@/$hash->{DEVICE}/g;
|
||||
$command =~ s/%/$newParam/g;
|
||||
|
Loading…
x
Reference in New Issue
Block a user