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:
parent
42bc524cfe
commit
c771e1a802
@ -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");
|
||||
}
|
||||
|
@ -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($@) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user