mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 00:26:03 +00:00
MAX: print error if too many parameters are given when setting desiredTemperature
git-svn-id: https://svn.fhem.de/fhem/trunk@8011 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
afbcbd359c
commit
3d350658f5
@ -282,16 +282,20 @@ MAX_Set($@)
|
||||
}
|
||||
|
||||
$ctrlmode = 0; #auto
|
||||
} elsif($args[0] eq "boost") {
|
||||
$temperature = 0;
|
||||
$ctrlmode = 3;
|
||||
#TODO: auto mode with temperature is also possible
|
||||
} elsif($args[0] eq "eco") {
|
||||
$temperature = MAX_ReadingsVal($hash,"ecoTemperature");
|
||||
} elsif($args[0] eq "comfort") {
|
||||
$temperature = MAX_ReadingsVal($hash,"comfortTemperature");
|
||||
}else{
|
||||
$temperature = MAX_ParseTemperature($args[0]);
|
||||
} else {
|
||||
return "To many parameters to desiredTemperature: expected one" if(@args > 1);
|
||||
|
||||
if($args[0] eq "boost") {
|
||||
$temperature = 0;
|
||||
$ctrlmode = 3;
|
||||
#TODO: auto mode with temperature is also possible
|
||||
} elsif($args[0] eq "eco") {
|
||||
$temperature = MAX_ReadingsVal($hash,"ecoTemperature");
|
||||
} elsif($args[0] eq "comfort") {
|
||||
$temperature = MAX_ReadingsVal($hash,"comfortTemperature");
|
||||
}else{
|
||||
$temperature = MAX_ParseTemperature($args[0]);
|
||||
}
|
||||
}
|
||||
|
||||
if(@args > 1 and ($args[1] eq "until") and ($ctrlmode == 1)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user