mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-07 23:09:26 +00:00
MAX: send right paket when resetting groupid to 0
git-svn-id: https://svn.fhem.de/fhem/trunk@2905 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
fd81cfcf57
commit
061606144c
@ -2,8 +2,6 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
# Written by Matthias Gehre, M.Gehre@gmx.de, 2012-2013
|
# Written by Matthias Gehre, M.Gehre@gmx.de, 2012-2013
|
||||||
#
|
#
|
||||||
# TODO:
|
|
||||||
# - Send RemoveGroupId packet if groupid is set to 0
|
|
||||||
package main;
|
package main;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
@ -299,7 +297,11 @@ MAX_Set($@)
|
|||||||
}elsif($setting eq "groupid"){
|
}elsif($setting eq "groupid"){
|
||||||
return "argument needed" if(@args == 0);
|
return "argument needed" if(@args == 0);
|
||||||
|
|
||||||
return ($hash->{IODev}{Send})->($hash->{IODev},"SetGroupId",$hash->{addr}, sprintf("%02x",$args[0]) );
|
if($args[0]) {
|
||||||
|
return ($hash->{IODev}{Send})->($hash->{IODev},"SetGroupId",$hash->{addr}, sprintf("%02x",$args[0]) );
|
||||||
|
} else {
|
||||||
|
return ($hash->{IODev}{Send})->($hash->{IODev},"RemoveGroupId",$hash->{addr});
|
||||||
|
}
|
||||||
|
|
||||||
}elsif( $setting ~~ ["ecoTemperature", "comfortTemperature", "measurementOffset", "maximumTemperature", "minimumTemperature", "windowOpenTemperature", "windowOpenDuration" ] and $hash->{type} =~ /.*Thermostat.*/) {
|
}elsif( $setting ~~ ["ecoTemperature", "comfortTemperature", "measurementOffset", "maximumTemperature", "minimumTemperature", "windowOpenTemperature", "windowOpenDuration" ] and $hash->{type} =~ /.*Thermostat.*/) {
|
||||||
return "Cannot set without IODev" if(!exists($hash->{IODev}));
|
return "Cannot set without IODev" if(!exists($hash->{IODev}));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user