diff --git a/fhem/CHANGED b/fhem/CHANGED index 04af7420e..f603ef3ca 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. + - change: 36_Vallox: added reading for handling homebridge speed control - bugfix: 72_FB_CALLMONITOR: fix wrong call-by-call number removing for german call-by-call numbers - change: 93_DbRep: commandRef revised diff --git a/fhem/FHEM/36_Vallox.pm b/fhem/FHEM/36_Vallox.pm index cf98f2af9..c138e430f 100644 --- a/fhem/FHEM/36_Vallox.pm +++ b/fhem/FHEM/36_Vallox.pm @@ -1228,6 +1228,12 @@ sub Vallox_InterpretAndUpdate(@) { readingsSingleUpdate( $hash, $Vallox_datatypes{$rawReadingType}, $fineReadingValue, 1 ); + # If this is a FanSpeed update FanSpeedPct as well + # + if ($rawReadingType eq "29") { + readingsSingleUpdate( $hash, "FanSpeedPct", POSIX::floor(($fineReadingValue*12.5)) , 1 ); + } + # If this is a CO2SetPointLower && CO2SetPointUpper has been set, write CO2SetPoint if ($rawReadingType eq "B4" && ReadingsVal( $name, "CO2SetPointUpper", "unknown" ) ne "unknown" ) { my $CO2SetPoint = ReadingsVal( $name, "CO2SetPointUpper", "unknown" ) . $fineReadingValue; @@ -1706,6 +1712,7 @@ sub Vallox_Set($@) { $setCommands .= " FanSpeed:slider,1,1,8"; $setCommands .= " FanSpeedMin:slider,1,1,8"; $setCommands .= " FanSpeedMax:slider,1,1,8"; + $setCommands .= " FanSpeedPct:slider,1,1,100"; $setCommands .= " BasicHumidityLevel:slider,0,1,100"; $setCommands .= " HeatRecoveryCellBypassSetpointTemperature:slider,0,1,20"; $setCommands .= " ServiceReminderMonths:slider,1,1,15"; @@ -1746,6 +1753,13 @@ sub Vallox_Set($@) { $cmd = $Vallox_multiReadingTable_realcmd{$cmd}; } + # Replace FanSpeedPct with FanSpeed + if ( $cmd eq "FanSpeedPct" ) { + $cmd = "FanSpeed"; + $arg = POSIX::ceil($arg / 12.5); + } + + ## TODO if ( exists $Vallox_datatypesReverse{$cmd} ) {