From f4b1fbf331b055cd5ddf3f688b6c3a54f36bf333 Mon Sep 17 00:00:00 2001 From: mgehre <> Date: Thu, 18 Jul 2013 22:25:31 +0000 Subject: [PATCH] MAX: Allow set desiredTemperature auto {eco/comfort} git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@3448 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/10_MAX.pm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/FHEM/10_MAX.pm b/FHEM/10_MAX.pm index 52dd57ef6..31756fbf9 100755 --- a/FHEM/10_MAX.pm +++ b/FHEM/10_MAX.pm @@ -253,7 +253,20 @@ MAX_Set($@) if($args[0] eq "auto") { #This enables the automatic/schedule mode where the thermostat follows the weekly program - $temperature = @args > 1 ? MAX_ParseTemperature($args[1]) : 0; + + #There can be a temperature supplied, which will be kept until the next switch point of the weekly program + if(@args > 1) { + if($args[1] eq "eco") { + $temperature = MAX_ReadingsVal($hash,"ecoTemperature"); + } elsif($args[1] eq "comfort") { + $temperature = MAX_ReadingsVal($hash,"comfortTemperature"); + } else { + $temperature = MAX_ParseTemperature($args[1]); + } + } else { + $temperature = 0; #use temperature from weekly program + } + $ctrlmode = 0; #auto } elsif($args[0] eq "boost") { $temperature = 0;