mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 13:26:02 +00:00
02_HTTPAPI.pm: Processing of the result output of the write command changed.
git-svn-id: https://svn.fhem.de/fhem/trunk@26361 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c79651628d
commit
4ece3af0f5
@ -196,7 +196,12 @@ sub HTTPAPI_CGI($$$) {
|
|||||||
# url decoding
|
# url decoding
|
||||||
$readingVal =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
|
$readingVal =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
|
||||||
if ($readingVal ne '') {
|
if ($readingVal ne '') {
|
||||||
($readingName, $readingVal) = split(/:\s?/, readingsSingleUpdate($defs{$fhemDevName}, $readingName, $readingVal, 1));
|
my $result = readingsSingleUpdate($defs{$fhemDevName}, $readingName, $readingVal, 1);
|
||||||
|
if ($readingName eq 'state') {
|
||||||
|
$readingVal = $result;
|
||||||
|
} else {
|
||||||
|
($readingName, $readingVal) = split(/:\s?/, $result);
|
||||||
|
}
|
||||||
return($hash, 200, 'close', "text/plain; charset=utf-8", encode($encoding, "$readingName=$readingVal"))
|
return($hash, 200, 'close', "text/plain; charset=utf-8", encode($encoding, "$readingName=$readingVal"))
|
||||||
} else {
|
} else {
|
||||||
readingsDelete($defs{$fhemDevName}, $readingName);
|
readingsDelete($defs{$fhemDevName}, $readingName);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user