Skip to content

Instantly share code, notes, and snippets.

@HolgerM1
Created April 8, 2025 20:05
Show Gist options
  • Save HolgerM1/56630b71685b4f447b4c1d32929a740f to your computer and use it in GitHub Desktop.
Save HolgerM1/56630b71685b4f447b4c1d32929a740f to your computer and use it in GitHub Desktop.
zappi_phasenumschaltung
blueprint:
name: Zappi Phasenumschaltung (1P/3P Auto)
description: >
Schaltet die Zappi-Wallbox automatisch zwischen 1-phasigem und 3-phasigem Laden,
abhängig vom PV-Überschuss, Anwesenheit und Verbindung des Fahrzeugs.
domain: automation
input:
leistungssensor:
name: PV-Leistungssensor (z. B. Zweirichtungszähler)
selector:
entity:
domain: sensor
phase_sensor:
name: Aktuelle Phasenanzahl (Zappi)
selector:
entity:
domain: sensor
phase_switch:
name: Phase-Umschalter (select)
selector:
entity:
domain: select
device_tracker:
name: Fahrzeug-Tracker (device_tracker)
selector:
entity:
domain: device_tracker
verbindung_sensor:
name: Fahrzeug verbunden (binary_sensor)
selector:
entity:
domain: binary_sensor
einspeise_limit:
name: Grenzwert (Wechsel auf 1P) in Watt (z. B. -4000)
default: -4000
selector:
number:
min: -10000
max: 1000
step: 100
unit_of_measurement: W
rueckschalt_limit:
name: Grenzwert (Wechsel auf 3P) in Watt (z. B. -4200)
default: -4200
selector:
number:
min: -10000
max: 1000
step: 100
unit_of_measurement: W
wartezeit:
name: Mindestdauer in Minuten
default: 5
selector:
number:
min: 1
max: 60
step: 1
unit_of_measurement: min
trigger:
- platform: numeric_state
entity_id: !input leistungssensor
above: !input einspeise_limit
for:
minutes: !input wartezeit
id: to_1p
- platform: numeric_state
entity_id: !input leistungssensor
below: !input rueckschalt_limit
for:
minutes: !input wartezeit
id: to_3p
condition:
- condition: state
entity_id: !input device_tracker
state: "home"
- condition: state
entity_id: !input verbindung_sensor
state: "on"
action:
- choose:
- conditions:
- condition: trigger
id: to_1p
- condition: state
entity_id: !input phase_sensor
state: "3"
sequence:
- service: select.select_option
data:
option: "1"
target:
entity_id: !input phase_switch
- conditions:
- condition: trigger
id: to_3p
- condition: state
entity_id: !input phase_sensor
state: "1"
sequence:
- service: select.select_option
data:
option: "3"
target:
entity_id: !input phase_switch
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment