make sync threshold temp adjustable
This commit is contained in:
@@ -25,6 +25,17 @@ blueprint:
|
||||
filter:
|
||||
- domain: sensor
|
||||
device_class: temperature
|
||||
sensor_sync_threshold:
|
||||
name: Sensor-Synchronisations-Schwellenwert
|
||||
description: Minimale Temperaturdifferenz in °C, um eine Sensor-Synchronisation auszulösen (Default = 0.5°C). Temperatur wird weiterhin spätestens nach 25 Minuten synchronisiert.
|
||||
default: 0.5
|
||||
selector:
|
||||
number:
|
||||
mode: box
|
||||
min: 0.1
|
||||
max: 1.0
|
||||
unit_of_measurement: "°C"
|
||||
step: 0.1
|
||||
heating_period_switch:
|
||||
name: Heizperiode Switch
|
||||
description: Optional - Input Boolean der angibt ob Heizperiode aktiv ist. Wenn nicht gesetzt, ist die Heizperiode immer aktiv.
|
||||
@@ -148,6 +159,7 @@ blueprint:
|
||||
variables:
|
||||
trv: !input trv
|
||||
temperature_sensor: !input temperature_sensor
|
||||
sensor_sync_threshold: !input sensor_sync_threshold
|
||||
heating_period_switch: !input heating_period_switch
|
||||
radiator_schedules: !input radiator_schedules
|
||||
active_scheduler_selector: !input active_scheduler_selector
|
||||
@@ -227,7 +239,7 @@ variables:
|
||||
{% set new_sensor_temp = states(temperature_sensor) | float(0) %}
|
||||
{% set target_temp = state_attr(trv, 'temperature') | float(0) %}
|
||||
{% set diff = (new_sensor_temp - current_remote_temp) | abs %}
|
||||
{% if diff >= 0.5 %}
|
||||
{% if diff >= sensor_sync_threshold %}
|
||||
true
|
||||
{% elif new_sensor_temp < target_temp and current_remote_temp >= target_temp %}
|
||||
true
|
||||
|
||||
Reference in New Issue
Block a user