2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-09 20:57:11 +00:00

94_PWM.pm : fix maxOffTime not working when using usePID=0

git-svn-id: https://svn.fhem.de/fhem/trunk@23402 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jamesgo 2020-12-22 11:20:05 +00:00
parent 18351fba19
commit f6cf30198c

View File

@ -36,6 +36,7 @@
# 05.03.19 GA fix reading maxOffTimeCalculation was set but not used
# 30.12.19 GA fix access to ReadingsVal via $name (reported by stromer-12)
# 26.05.20 GA fix division by zero if minRoomsOn is >0 and roomsCounted is zero
# 22.12.20 GA fix maxOffTime for P calculation never activated
##############################################
# $Id$
@ -901,7 +902,7 @@ PWM_CalcRoom(@)
return ("on", $newpulse, $cycletime, $actorV);
}
if ($newpulse == 0) {
if ($newpulse == 0 or ($maxOffTimeApply > 0 and $room->{c_PID_useit} eq 0)) {
# ----------------
# check if maxOffTime protection is activated (attribute maxOffTimeIdlePeriod is set)