mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
14_CUL_TCM97001: fix HH humidy for GT_WT_02
git-svn-id: https://svn.fhem.de/fhem/trunk@12956 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
27f389ab44
commit
349559c4bf
@ -1,5 +1,6 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 14_CUL_TCM97001: fix HH humidy for GT_WT_02
|
||||||
- feature: 57_Calender: new attribute SSLVerify
|
- feature: 57_Calender: new attribute SSLVerify
|
||||||
- feature: 00_MQTT: Added username password (optional).
|
- feature: 00_MQTT: Added username password (optional).
|
||||||
- feature: 41_OREGON: support event-min-interval, event-on-change-reading,
|
- feature: 41_OREGON: support event-min-interval, event-on-change-reading,
|
||||||
|
@ -235,8 +235,8 @@ sub checkValues {
|
|||||||
if (!defined($humidy)) {
|
if (!defined($humidy)) {
|
||||||
$humidy = 50;
|
$humidy = 50;
|
||||||
}
|
}
|
||||||
if ($temp < 60 && $temp > -30
|
if ($temp <= 60 && $temp >= -30
|
||||||
&& $humidy > 0 && $humidy < 100) {
|
&& $humidy >= 0 && $humidy <= 100) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -791,6 +791,14 @@ CUL_TCM97001_Parse($$)
|
|||||||
$temp = $temp / 10;
|
$temp = $temp / 10;
|
||||||
$humidity = (hex($a[6].$a[7]) & 0x0FE) >> 1; # only the first 7 bits are the humidity
|
$humidity = (hex($a[6].$a[7]) & 0x0FE) >> 1; # only the first 7 bits are the humidity
|
||||||
|
|
||||||
|
if ($humidity > 100) {
|
||||||
|
# HH - Workaround
|
||||||
|
$humidity = 100;
|
||||||
|
} elsif ($humidity < 20) {
|
||||||
|
# LL - Workaround
|
||||||
|
$humidity = 20;
|
||||||
|
}
|
||||||
|
|
||||||
if (checkValues($temp, $humidity)) {
|
if (checkValues($temp, $humidity)) {
|
||||||
$channel = ((hex($a[2])) & 0x3) + 1;
|
$channel = ((hex($a[2])) & 0x3) + 1;
|
||||||
$batbit = ((hex($a[2]) & 0x8) != 0x8);
|
$batbit = ((hex($a[2]) & 0x8) != 0x8);
|
||||||
@ -819,9 +827,7 @@ CUL_TCM97001_Parse($$)
|
|||||||
Log3 $name, 2, "CUL_TCM97001 Unknown device $deviceCode, please define it";
|
Log3 $name, 2, "CUL_TCM97001 Unknown device $deviceCode, please define it";
|
||||||
return "UNDEFINED $model" . substr($deviceCode, rindex($deviceCode,"_")) . " CUL_TCM97001 $deviceCode";
|
return "UNDEFINED $model" . substr($deviceCode, rindex($deviceCode,"_")) . " CUL_TCM97001 $deviceCode";
|
||||||
}
|
}
|
||||||
if ($humidity >= 20) {
|
$hashumidity = TRUE;
|
||||||
$hashumidity = TRUE;
|
|
||||||
}
|
|
||||||
$hasbatcheck = TRUE;
|
$hasbatcheck = TRUE;
|
||||||
$haschannel = TRUE;
|
$haschannel = TRUE;
|
||||||
$hasmode = TRUE;
|
$hasmode = TRUE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user