2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

Heating_Control, WeekdayTimer

- set <device> enable
- set <device> disable
added and fixed a issue.

git-svn-id: https://svn.fhem.de/fhem/trunk@6057 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
dietmar63 2014-06-04 19:27:19 +00:00
parent 42bc524cfe
commit c771e1a802
2 changed files with 15 additions and 5 deletions

View File

@ -51,8 +51,9 @@ sub Heating_Control_Initialize($)
################################################################################
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 "?");
return "Unknown argument $a[1], choose one of enable disable " if($a[1] eq "?");
my $name = shift @a;
my $v = join(" ", @a);
@ -60,7 +61,7 @@ sub Heating_Control_Set($@) {
Log3 $hash, 3, "[$name] set $name $v";
if ($v eq "enable") {
fhem("attr $name disable 1");
fhem("attr $name disable 0");
} elsif ($v eq "disable") {
fhem("attr $name disable 1");
}

View File

@ -48,12 +48,21 @@ sub WeekdayTimer_Initialize($)
################################################################################
sub WeekdayTimer_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 "?");
return "Unknown argument $a[1], choose one of enable disable " if($a[1] eq "?");
Heating_Control_Set($@);
my $name = shift @a;
my $v = join(" ", @a);
Log3 $hash, 3, "[$name] set $name $v";
return undef;
if ($v eq "enable") {
fhem("attr $name disable 0");
} elsif ($v eq "disable") {
fhem("attr $name disable 1");
}
return undef;
}
########################################################################
sub WeekdayTimer_Get($@) {