Skip to content

Commit

Permalink
FIX: generic calibration
Browse files Browse the repository at this point in the history
  • Loading branch information
panhans committed Jan 13, 2025
1 parent d15eee9 commit db8ad46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blueprints/automation/panhans/advanced_heating_control.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2818,12 +2818,12 @@ variables:
{% if input_calibration_generic %}
{% if current_valve_temp != ref_temp %}
{% set offset = ref_temp - current_valve_temp %}
{% set offset = current_valve_temp - ref_temp %}
{% set offset = iif(offset > float(input_generic_calibration_offset), input_generic_calibration_offset, offset) %}
{% set offset = iif(offset < float(input_generic_calibration_offset) * -1, input_generic_calibration_offset * -1, offset) %}
{% set temp_with_offset = float(valve_temp) - float(offset) %}
{% set temp_with_offset = float(valve_temp) + float(offset) %}
{% set step = state_attr(valve, 'target_temp_step') | float(0.5) %}
{% set temp_with_offset = (temp_with_offset | float(0) / float(step)) | round(0) * float(step) %}
Expand Down

0 comments on commit db8ad46

Please sign in to comment.