2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

72_XiaomiDevice: set incorrect fan speed to 0

git-svn-id: https://svn.fhem.de/fhem/trunk@17464 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
moises 2018-10-05 22:29:21 +00:00
parent bde16d0180
commit 1ec69459a5
2 changed files with 3 additions and 2 deletions

View File

@ -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: 72_XiaomiDevice: set incorrect fan speed to 0
- bugfix: 38_netatmo: increased timeouts to counter server issues, logging
- bugfix: 88_HMCCU: Detection of non standard addresses
- feature: 93_Log2Syslog: TCP-Server in Collector-mode / SSL-support and a

View File

@ -2158,7 +2158,7 @@ sub XiaomiDevice_ParseJSON($$)
readingsBulkUpdate( $hash, "child_lock", $json->{result}[11], 1 ) if(defined($json->{result}[11]));
readingsBulkUpdate( $hash, "temperature", $json->{result}[12]/10, 1 ) if(defined($json->{result}[12]) && $json->{result}[12] ne "null");
readingsBulkUpdate( $hash, "humidity", $json->{result}[13], 1 ) if(defined($json->{result}[13]) && $json->{result}[13] ne "null");
readingsBulkUpdate( $hash, "speed", $json->{result}[14], 1 ) if(defined($json->{result}[14]));
readingsBulkUpdate( $hash, "speed", (($json->{result}[2] eq "off")?"0":$json->{result}[14]), 1 ) if(defined($json->{result}[14]));
readingsBulkUpdate( $hash, "button_pressed", $json->{result}[15], 1 ) if(defined($json->{result}[15]) && $json->{result}[15] ne "null");
readingsEndUpdate($hash,1);
return undef;
@ -2176,7 +2176,7 @@ sub XiaomiDevice_ParseJSON($$)
$fanspeed = 0 if($json->{result}[0] eq "off");
readingsBulkUpdate( $hash, "level", $fanspeed, 1 ) if(defined($json->{result}[2]));
readingsBulkUpdate( $hash, "mode", (int($json->{result}[2])>0)?"natural":"straight", 1 ) if(defined($json->{result}[2]));
readingsBulkUpdate( $hash, "speed", $json->{result}[3], 1 ) if(defined($json->{result}[3]));
readingsBulkUpdate( $hash, "speed", (($json->{result}[0] eq "off")?"0":$json->{result}[3]), 1 ) if(defined($json->{result}[3]));
readingsEndUpdate($hash,1);
return undef;
}