From 2d741ac4067ef3662d1326630cb5a8a378f0bec3 Mon Sep 17 00:00:00 2001 From: nobbi1991 <48419518+nobbi1991@users.noreply.github.com> Date: Thu, 26 Sep 2024 21:24:30 +0200 Subject: [PATCH] switch docker to py3.12 --- Dockerfile | 4 ++-- habapp_rules/common/filter.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0b67232..9cfd8d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11 as buildimage +FROM python:3.12 as buildimage COPY . /tmp/app_install @@ -7,7 +7,7 @@ RUN set -eux; \ cd /tmp/app_install; \ pip wheel --wheel-dir=/root/wheels . -FROM python:3.11 +FROM python:3.12 COPY --from=buildimage /root/wheels /root/wheels COPY container/entrypoint.sh /entrypoint.sh diff --git a/habapp_rules/common/filter.py b/habapp_rules/common/filter.py index 142219c..51fc0de 100644 --- a/habapp_rules/common/filter.py +++ b/habapp_rules/common/filter.py @@ -58,7 +58,7 @@ def __init__(self, config: habapp_rules.common.config.filter.ExponentialFilterCo sample_time = self._config.parameter.tau / 5 # fifth part of the filter time constant self._alpha = 0.2 # always 0.2 since we always have the fifth part of the filter time constant - self.run.every(None, sample_time, self._cb_cyclic_calculate_and_update_output) + self.run.at(self.run.trigger.interval(None, sample_time), self._cb_cyclic_calculate_and_update_output) if self._config.parameter.instant_increase or self._config.parameter.instant_decrease: self._config.items.raw.listen_event(self._cb_item_raw, HABApp.openhab.events.ItemStateChangedEventFilter())