diff --git a/fhem/FHEM/59_Twilight.pm b/fhem/FHEM/59_Twilight.pm
index 0206d87ee..ceb68b5d4 100644
--- a/fhem/FHEM/59_Twilight.pm
+++ b/fhem/FHEM/59_Twilight.pm
@@ -361,8 +361,10 @@ sub Twilight_fireEvent($)
my $nextEvent = $hash->{TW}{$sx}{NEXTE};
my $nextEventTime = "undefined";
- $nextEventTime = strftime("%H:%M:%S",localtime($hash->{TW}{$nextEvent}{TIME})) if ($hash->{TW}{$nextEvent}{TIME} ne "nan");
- Log3 $hash, 4, "[".$hash->{NAME}."] " . sprintf ("%-10s state=%-2s light=%-2s nextEvent=%-10s %-14s deg=%+.1f°",$sx, $state, $light, $nextEvent, strftime("%d.%m.%Y %H:%M:%S",localtime($hash->{TW}{$nextEvent}{TIME})), $deg);
+ if ($hash->{TW}{$nextEvent}{TIME} ne "nan") {
+ $nextEventTime = strftime("%H:%M:%S",localtime($hash->{TW}{$nextEvent}{TIME}));
+ Log3 $hash, 4, "[".$hash->{NAME}."] " . sprintf ("%-10s state=%-2s light=%-2s nextEvent=%-10s %-14s deg=%+.1f°",$sx, $state, $light, $nextEvent, strftime("%d.%m.%Y %H:%M:%S",localtime($hash->{TW}{$nextEvent}{TIME})), $deg);
+ }
my $eventTime = $hash->{TW}{$sx}{TIME};
my $now = time();
diff --git a/fhem/FHEM/98_Heating_Control.pm b/fhem/FHEM/98_Heating_Control.pm
index b6d0606d2..7dafd777d 100644
--- a/fhem/FHEM/98_Heating_Control.pm
+++ b/fhem/FHEM/98_Heating_Control.pm
@@ -39,14 +39,34 @@ sub Heating_Control_Initialize($)
}
# Consumer
+ $hash->{SetFn} = "Heating_Control_Set";
$hash->{DefFn} = "Heating_Control_Define";
$hash->{UndefFn} = "Heating_Control_Undef";
$hash->{GetFn} = "Heating_Control_Get";
+ $hash->{AttrFn} = "Heating_Control_Attr";
$hash->{UpdFn} = "Heating_Control_Update";
$hash->{AttrList}= "disable:0,1 windowSensor ".
$readingFnAttributes;
}
################################################################################
+sub Heating_Control_Set($@) {
+ my ($hash, @a) = @_;
+ return "no set value specified" if(int(@a) < 2);
+ return "Unknown argument $a[1], choose one of enable/disable refresh" if($a[1] eq "?");
+
+ my $name = shift @a;
+ my $v = join(" ", @a);
+
+ Log3 $hash, 3, "[$name] set $name $v";
+
+ if ($v eq "enable") {
+ fhem("attr $name disable 1");
+ } elsif ($v eq "disable") {
+ fhem("attr $name disable 1");
+ }
+ return undef;
+}
+################################################################################
sub Heating_Control_Get($@)
{
my ($hash, @a) = @_;
@@ -461,7 +481,7 @@ sub Heating_Control_Device_Schalten($$$$) {
my $mod = "[".$hash->{NAME} ."] "; ###
#modifier des Zieldevices auswaehlen
- my $setModifier = isHeizung($hash);
+ my $setModifier = Heating_Control_isHeizung($hash);
# Kommando aufbauen
if (defined $hash->{helper}{CONDITION}) {
@@ -513,7 +533,17 @@ sub Heating_Control_Device_Schalten($$$$) {
}
}
########################################################################
-sub isHeizung($) {
+sub Heating_Control_Attr($$$) {
+ my ($cmd, $name, $attrName, $attrVal) = @_;
+
+ if( $attrName eq "disable" ) {
+ my $hash = $defs{$name};
+ readingsSingleUpdate ($hash, "disabled", $attrVal, 1);
+ }
+ return undef;
+}
+########################################################################
+sub Heating_Control_isHeizung($) {
my ($hash) = @_;
my %setmodifiers =
@@ -532,8 +562,8 @@ sub isHeizung($) {
"HM-CC-RT-DN" => 1 } );
my $dHash = $defs{$hash->{DEVICE}}; ###
my $dType = $dHash->{TYPE};
- Log3 $hash, 5, "dType------------>$dType";
return "" if (!defined($dType));
+ Log3 $hash, 5, "dType------------>$dType";
my $setModifier = $setmodifiers{$dType};
$setModifier = "" if (!defined($setModifier));
@@ -654,6 +684,49 @@ sub SortNumber {
by well-known Block with {}.
Note: if a command is defined only this command are executed. In case of executing
a "set desired-temp" command, you must define it explicitly.
+
+
+
+
measured-temp: 21.7 (Celsius)
$EVTPART0="measured-temp:", $EVTPART1="21.7",
+ $EVTPART2="(Celsius)"
. This data is available as a local
+ variable in perl, as environment variable for shell scripts, and will
+ be textually replaced for FHEM commands.myFht
%
will be replaced with the received
+ event, e.g. with on
or off
or
+ measured-temp: 21.7 (Celsius)
%
into double quotes, else the shell may get a syntax
+ error.@
will be replaced with the device
+ name.%
and @
, the parameters
+ %EVENT
(same as %
), %NAME
(same
+ as @
) and %TYPE
(contains the device type,
+ e.g. FHT
) can be used. The space separated event "parts"
+ are available as %EVTPART0, %EVTPART1, etc. A single %
+ looses its special meaning if any of these parameters appears in the
+ definition.set <name> <value>
+ value
is one of:+ enable # enables the Heating_Control + disable # disables the Heating_Control ++ + Examples: +
set hc disable
set hc enable
set <name> <value>
+ value
is one of:+ disable # disables the Weekday_Timer + enable # enables the Weekday_Timer ++ + Examples: +
set wd disable
set wd enable