Set cooling/heating state only if enabled
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Søren Rasmussen 2022-07-25 23:58:39 +02:00
parent 01200ac98b
commit aaf865a72a

View file

@ -175,9 +175,9 @@ func (p *ChamberController) computeChamberState() ChamberState {
}
var next ChamberState
heater := p.chamberTemperature < p.config.FermentationTemperature-p.config.DeltaTemperatureHeat //&&
heater := p.config.HeaterEnabled && p.chamberTemperature < p.config.FermentationTemperature-p.config.DeltaTemperatureHeat //&&
//p.chamberTemperature < chamberTargetTemp-p.config.DeltaTemperatureHeat
cooler := p.chamberTemperature > p.config.FermentationTemperature+p.config.DeltaTemperatureCool //&&
cooler := p.config.CoolerEnabled && p.chamberTemperature > p.config.FermentationTemperature+p.config.DeltaTemperatureCool //&&
//p.chamberTemperature > chamberTargetTemp+p.config.DeltaTemperatureCool
if cooler && heater {