File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -192,14 +192,14 @@ def _update_integral(self, state: TemperatureState) -> None:
192192 return
193193
194194 if self ._last_integral_updated is None :
195- self ._last_integral_updated = state .last_reported .timestamp ()
195+ self ._last_integral_updated = state .last_changed .timestamp ()
196196 return
197197
198- delta_time = state .last_reported .timestamp () - self ._last_integral_updated
198+ delta_time = state .last_changed .timestamp () - self ._last_integral_updated
199199
200200 # Ignore non-forward timestamps.
201201 if delta_time <= 0 :
202- self ._last_integral_updated = state .last_reported .timestamp ()
202+ self ._last_integral_updated = state .last_changed .timestamp ()
203203 return
204204
205205 # Skip integration when integral gain is disabled.
@@ -210,7 +210,7 @@ def _update_integral(self, state: TemperatureState) -> None:
210210 self ._integral = clamp_to_range (self ._integral , self ._heating_curve .value )
211211
212212 # Record the timestamp used for this integration step.
213- self ._last_integral_updated = state .last_reported .timestamp ()
213+ self ._last_integral_updated = state .last_changed .timestamp ()
214214
215215 def _update_derivative (self , state : TemperatureState ) -> None :
216216 """Update the derivative term of the PID controller based on temperature slope."""
You can’t perform that action at this time.
0 commit comments