mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-15 16:19:11 +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
|
||||
$readingVal =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
|
||||
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"))
|
||||
} else {
|
||||
readingsDelete($defs{$fhemDevName}, $readingName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user