heater_pc: test template on connect

This allows us to handle template errors early and
show the user visible error output in web ui
Instead of crashing within the reactor.

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This commit is contained in:
Timofey Titovets 2025-10-09 20:55:28 +02:00
parent 936023b573
commit bbfffa7e6f

View file

@ -51,6 +51,8 @@ class HeaterPredictControl:
output = self.output
return output
heater.set_pc_callback(callback)
# Test template
self._render(.0)
def _render(self, eventtime):
context = self.create_context()
output = self.template.render(context)