Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- blueprint:
- name: "PV Überschuss Steuerung – Stop"
- description: |
- Schaltet Heizstab-Phasen NUR ab wenn:
- 1. PV-Export < Schwellwert FÜR [Dauer] UND
- 2. Batterie < Mindestladung.
- Prüft alle 15 Minuten zusätzlich.
- Optional: Benachrichtigungen mit dynamischem Inhalt (abschaltbar).
- domain: automation
- input:
- export_sensor:
- name: "PV Export Sensor"
- description: "Sensor für Netzrückspeisung in Watt (z. B. sensor.grid_power)"
- selector:
- entity:
- domain: sensor
- batterieladung_sensor:
- name: "Batterieladung Sensor"
- description: "Sensor für Batterieladung in % (z. B. sensor.battery_soc)"
- selector:
- entity:
- domain: sensor
- phase_1:
- name: "Phase 1 Schalter"
- description: "Input Boolean für Phase 1"
- selector:
- entity:
- domain: input_boolean
- phase_2:
- name: "Phase 2 Schalter"
- description: "Input Boolean für Phase 2"
- selector:
- entity:
- domain: input_boolean
- phase_3:
- name: "Phase 3 Schalter"
- description: "Input Boolean für Phase 3"
- selector:
- entity:
- domain: input_boolean
- export_threshold:
- name: "Export Schwellwert"
- description: "Abschaltgrenze in Watt (z. B. 500)"
- default: 500
- selector:
- number:
- min: 0
- max: 5000
- step: 50
- unit_of_measurement: W
- battery_threshold:
- name: "Batterie Schwellwert"
- description: "Mindestladung in % (z. B. 20)"
- default: 20
- selector:
- number:
- min: 0
- max: 100
- step: 5
- unit_of_measurement: "%"
- duration:
- name: "Mindestdauer"
- description: "Dauer der Unterschreitung (z. B. 5:00)"
- default: "00:05:00"
- selector:
- duration:
- enable_day: false
- enable_notifications:
- name: "Benachrichtigungen aktivieren"
- description: "Nur wenn aktiviert, werden Nachrichten versendet"
- selector:
- entity:
- domain: input_boolean
- notify_service:
- name: "Benachrichtigungsdienst"
- description: "Service für Benachrichtigungen (z. B. notify.mobile_app_xyz)"
- selector:
- text:
- message_phase_1:
- name: Nachricht Phase 1
- default: >-
- ⚠️ Phase 1 abgeschaltet
- Grund: {{ trigger_type }}
- PV-Export: {{ export_value }} W < {{ export_threshold }} W
- Batterie: {{ battery_value }} % < {{ battery_threshold }} %
- Zeit: {{ timestamp }}
- selector:
- text:
- message_phase_2:
- name: Nachricht Phase 2
- default: >-
- ⚠️ Phase 2 abgeschaltet
- Grund: {{ trigger_type }}
- PV-Export: {{ export_value }} W < {{ export_threshold }} W
- Batterie: {{ battery_value }} % < {{ battery_threshold }} %
- Zeit: {{ timestamp }}
- selector:
- text:
- message_phase_3:
- name: Nachricht Phase 3
- default: >-
- ⚠️ Phase 3 abgeschaltet
- Grund: {{ trigger_type }}
- PV-Export: {{ export_value }} W < {{ export_threshold }} W
- Batterie: {{ battery_value }} % < {{ battery_threshold }} %
- Zeit: {{ timestamp }}
- selector:
- text:
- trigger:
- - platform: numeric_state
- entity_id: !input export_sensor
- below: !input export_threshold
- for: !input duration
- - platform: numeric_state
- entity_id: !input batterieladung_sensor
- below: !input battery_threshold
- for: !input duration
- - platform: time_pattern
- minutes: "/15"
- condition:
- - condition: and
- conditions:
- - condition: numeric_state
- entity_id: !input export_sensor
- below: !input export_threshold
- - condition: numeric_state
- entity_id: !input batterieladung_sensor
- below: !input battery_threshold
- - condition: or
- conditions:
- - condition: state
- entity_id: !input phase_1
- state: "on"
- - condition: state
- entity_id: !input phase_2
- state: "on"
- - condition: state
- entity_id: !input phase_3
- state: "on"
- action:
- - variables:
- export_entity: !input export_sensor
- battery_entity: !input batterieladung_sensor
- export_threshold: !input export_threshold
- battery_threshold: !input battery_threshold
- export_value: "{{ states(export_entity) | float(0) | round(1) }}"
- battery_value: "{{ states(battery_entity) | float(0) | round(1) }}"
- timestamp: "{{ now().strftime('%H:%M') }}"
- trigger_type: >
- {% if trigger.platform == 'time_pattern' %}
- Zeit-Trigger
- {% else %}
- Wertänderung
- {% endif %}
- - choose:
- - conditions:
- - condition: state
- entity_id: !input phase_3
- state: "on"
- sequence:
- - service: input_boolean.turn_off
- target:
- entity_id: !input phase_3
- - if:
- - condition: state
- entity_id: !input enable_notifications
- state: "on"
- then:
- - service: !input notify_service
- data:
- title: "PV-Überschuss: Phase 3 abgeschaltet"
- message: !input message_phase_3
- - conditions:
- - condition: state
- entity_id: !input phase_2
- state: "on"
- sequence:
- - service: input_boolean.turn_off
- target:
- entity_id: !input phase_2
- - if:
- - condition: state
- entity_id: !input enable_notifications
- state: "on"
- then:
- - service: !input notify_service
- data:
- title: "PV-Überschuss: Phase 2 abgeschaltet"
- message: !input message_phase_2
- - conditions:
- - condition: state
- entity_id: !input phase_1
- state: "on"
- sequence:
- - service: input_boolean.turn_off
- target:
- entity_id: !input phase_1
- - if:
- - condition: state
- entity_id: !input enable_notifications
- state: "on"
- then:
- - service: !input notify_service
- data:
- title: "PV-Überschuss: Phase 1 abgeschaltet"
- message: !input message_phase_1
- mode: single
Advertisement