diff --git a/fhem/CHANGED b/fhem/CHANGED index 6e1439b88..f622e497e 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 10_KNX: fix bug introduced w. last change, Forum #122582 - bugfix: 93_DbRep: fix diffValue for newer MariaDB Forum: #130697 - change: 98_todoist: API v9, please check - change: 00_KNXIO: minor changes, Forum #127792 diff --git a/fhem/FHEM/10_KNX.pm b/fhem/FHEM/10_KNX.pm index 66f79ab58..34c21e016 100644 --- a/fhem/FHEM/10_KNX.pm +++ b/fhem/FHEM/10_KNX.pm @@ -635,7 +635,6 @@ sub KNX_Get { my $gadName = $args[0] // $hash->{FIRSTGADNAME}; #FHEM asks with a ? at startup - no action, no log - if dev is disabled: no SET/GET pulldown ! -# return qq{unknown argument $cmd choose one of $hash->{GETSTRING}} if(defined($cmd) && ($cmd =~ m/\?/x)); if ($gadName =~ m/\?/x) { return (IsDisabled($name) == 1)?undef:qq{unknown argument choose one of $hash->{GETSTRING}}; =pod @@ -691,7 +690,6 @@ sub KNX_Set { $thisSub .= qq{ ($name): }; #FHEM asks with a "?" at startup or any reload of the device-detail-view - if dev is disabled: no SET/GET pulldown ! -# return qq{unknown argument $cmd choose one of $hash->{SETSTRING}} if(defined($cmd) && ($cmd =~ m/\?/x)); if(defined($cmd) && ($cmd =~ m/\?/x)) { return (IsDisabled($name) == 1)?undef:qq{unknown argument $cmd choose one of $hash->{SETSTRING}}; } @@ -1061,22 +1059,21 @@ sub KNX_Parse { Log3 ($deviceName, 5, qq{KNX_Parse ($deviceName): [r] GET}); #answer "old school" - my $value = ReadingsVal($deviceName, 'state', undef); # fetch default value from state -# my $value = undef; +# my $value = ReadingsVal($deviceName, 'state', undef); # fetch default value from state + my $value = undef; if (AttrVal($deviceName, 'answerReading', 0) != 0) { my $putVal = ReadingsVal($deviceName, $putName, undef); if (defined($putVal) && ($putVal ne q{})) { $value = $putVal; #medium priority, overwrite $value } -# else { -# $value = ReadingsVal($deviceName, 'state', undef); #lowest priority - use state -# } + else { + $value = ReadingsVal($deviceName, 'state', undef); #lowest priority - use state! + } } #high priority - eval my $cmdAttr = AttrVal($deviceName, 'putCmd', undef); if ((defined($cmdAttr)) && ($cmdAttr ne q{})) { -# $value = ReadingsVal($deviceName, 'state', undef); # fetch default value from state $value = KNX_eval ($deviceHash, $gadName, $value, $cmdAttr); if (defined($value) && ($value ne q{}) && ($value ne 'ERROR')) { # answer only, if eval was successful Log3 ($deviceName, 5, qq{KNX_Parse ($deviceName): [r] replaced by Attr putCmd=$cmdAttr VALUE=$value});