Tiffy86

WP Sublogik Normalbetrieb

Jul 15th, 2026
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.45 KB | None | 0 0
  1. alias: "WP: Sub-Logik Normalbetrieb (Finale Version mit Auto-Off)"
  2. description: >-
  3.   Regelt im Normalbetrieb die Frequenz. Erkennt dynamisch den PV-Boost und
  4.   erweitert das Limit auf 60Hz.
  5. triggers:
  6.   - entity_id: sensor.vorlauf_stabil
  7.     trigger: state
  8.   - minutes: /10
  9.     trigger: time_pattern
  10.   - entity_id: sensor.oelrueckfuehrung
  11.     from: "1"
  12.     to: "0"
  13.     trigger: state
  14. conditions:
  15.   - condition: state
  16.     entity_id: input_boolean.wp_modus_normalbetrieb
  17.     state: "on"
  18. actions:
  19.   - if:
  20.       - condition: template
  21.         value_template: "{{ is_state('automation.warmepumpe_frequenzregelung_sanft', 'off') }}"
  22.     then:
  23.       - action: input_boolean.turn_off
  24.         target:
  25.           entity_id: input_boolean.wp_modus_normalbetrieb
  26.       - stop: Haupt-Automation ist aus. Normalbetrieb-Schalter wurde deaktiviert.
  27.   - if:
  28.       - condition: or
  29.         conditions:
  30.           - condition: state
  31.             entity_id: sensor.oelrueckfuehrung
  32.             state: "1"
  33.           - condition: state
  34.             entity_id: sensor.oelrueckfuehrung
  35.             state: "1"
  36.             for:
  37.               seconds: 30
  38.     then:
  39.       - stop: Ölrückführung aktiv oder Pufferzeit läuft.
  40.   - variables:
  41.       is_boost: "{{ is_state('input_boolean.wp_pv_boost', 'on') }}"
  42.       current_f: "{{ states('sensor.frequenz_vd') | int(20) }}"
  43.       soll_f: "{{ states('input_number.sollfrequenz') | int(20) }}"
  44.       soll_vl: |-
  45.         {% if is_state('input_boolean.wp_pv_boost', 'on') %}
  46.           {{ states('input_number.wp_pv_boost_temp') | float(45) }}
  47.         {% else %}
  48.           {{ states('number.heizkurve') | float(35) }}
  49.         {% endif %}
  50.       ist_vl: "{{ states('sensor.vorlauf_stabil') | float(0) }}"
  51.       d: "{{ soll_vl - ist_vl }}"
  52.   - variables:
  53.       new_f: >
  54.        {% set val = soll_f %}  {% if d > 0.2 %}
  55.           {% set val = soll_f + 1 %}
  56.         {% elif d < -0.2 %}
  57.           {% set val = soll_f - 1 %}
  58.         {% endif %}
  59.  
  60.         {# NEU: Dynamisches Maximum: 60Hz im Boost, sonst 45Hz #} {% set max_f =
  61.         60 if is_boost else 45 %}
  62.  
  63.         {% if val > max_f %}
  64.           {{ max_f }}
  65.         {% elif val < 20 %}
  66.           20
  67.         {% else %}
  68.           {{ val }}
  69.         {% endif %}
  70.   - condition: template
  71.     value_template: "{{ new_f | int != soll_f | int }}"
  72.   - action: input_number.set_value
  73.     target:
  74.       entity_id: input_number.sollfrequenz
  75.     data:
  76.       value: "{{ new_f }}"
  77.  
Advertisement
Add Comment
Please, Sign In to add comment