Aktuell sieht es so aus und sollte die bestehenden Funktionen plus 5000W-Ableitung laut #91 erfüllen (bis auf die Urlaubslösung).
Code:
alias: Test Wasser
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.total_dc_power
above: 1500
alias: Überschuss
id: An
for:
hours: 0
minutes: 0
seconds: 0
- platform: numeric_state
entity_id: sensor.total_dc_power
alias: Kein Überschuss
id: Aus
below: 1500
for:
hours: 0
minutes: 0
seconds: 30
- platform: time
at: "05:30:00"
alias: Morgens
id: An
- platform: time
at: "10:30:00"
alias: Mittags
id: An
- platform: time
at: "15:00:00"
alias: Abends
id: An
- platform: numeric_state
entity_id: sensor.battery_level
above: 30
alias: Batterie > 30%
id: An
- platform: numeric_state
entity_id: sensor.battery_level
above: 60
alias: Batterie > 60%
id: An
- platform: numeric_state
entity_id: sensor.battery_level
above: 85
alias: Batterie > 85%
id: An
- platform: numeric_state
entity_id: sensor.battery_level
alias: Batterie < 25%
id: Aus
below: 25
- platform: numeric_state
entity_id: sensor.battery_level
alias: Batterie < 55%
id: Aus
below: 55
- platform: numeric_state
entity_id: sensor.battery_level
alias: Batterie < 75%
id: Aus
below: 75
- platform: numeric_state
entity_id: "sensor.battery_charging_power "
for:
hours: 0
minutes: 0
seconds: 0
above: 5000
alias: Ladeleistung > 5kW
id: Ladeleistung >
- platform: numeric_state
entity_id: "sensor.battery_charging_power "
for:
hours: 0
minutes: 30
seconds: 0
alias: Ladeleistung < 5kW
below: 5000
id: Aus
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Ladeleistung >
alias: Ladeleistung > 5kW
- condition: state
entity_id: switch.wasserspeicher_16a
state: "off"
alias: Heizstab aus?
sequence:
- service: switch.turn_on
data: {}
target:
entity_id: switch.wasserspeicher_16a
alias: Heizung an
- conditions:
- condition: time
after: "10:30:00"
before: "14:00:00"
alias: Tag_Mo-So
sequence:
- if:
- condition: trigger
id: An
alias: Trigger für Anschalten?
- condition: numeric_state
entity_id: sensor.total_dc_power
above: 1500
alias: Überschuss?
- condition: numeric_state
entity_id: sensor.battery_level
above: 60
alias: Batterie > 60%
- condition: state
entity_id: switch.wasserspeicher_16a
state: "off"
alias: Heizstab aus?
then:
- service: switch.turn_on
data: {}
target:
entity_id: switch.wasserspeicher_16a
alias: Heizung an
alias: Anschalten?
- if:
- condition: trigger
id: Aus
alias: Trigger für Ausschalten?
- condition: numeric_state
entity_id: sensor.battery_charging_power
below: 5000
alias: Ladeleistung < 5kW
- condition: numeric_state
entity_id: sensor.battery_level
below: 55
alias: Batterie < 55%
- condition: state
entity_id: switch.wasserspeicher_16a
state: "on"
alias: Heizstab an?
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.wasserspeicher_16a
alias: Heizung aus
alias: Ausschalten?
- conditions:
- condition: time
after: "05:30:00"
before: "09:00:00"
alias: morgens_Mo-Fr
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: time
alias: Morgens_Sa-So
after: "06:30:00"
before: "09:00:00"
weekday:
- sat
- sun
sequence:
- if:
- condition: trigger
id: An
alias: Trigger für Anschalten?
- condition: numeric_state
entity_id: sensor.total_dc_power
above: 1500
alias: Überschuss?
- condition: numeric_state
entity_id: sensor.battery_level
above: 30
alias: Batterie > 30%
- condition: state
entity_id: switch.wasserspeicher_16a
state: "off"
alias: Heizstab aus?
then:
- service: switch.turn_on
data: {}
target:
entity_id: switch.wasserspeicher_16a
alias: Heizung an
alias: Anschalten?
- if:
- condition: trigger
id: Aus
alias: Trigger für Ausschalten?
- condition: numeric_state
entity_id: sensor.battery_charging_power
below: 5000
alias: Ladeleistung < 5kW
- condition: numeric_state
entity_id: sensor.battery_level
below: 25
alias: Batterie < 25%
- condition: state
entity_id: switch.wasserspeicher_16a
state: "on"
alias: Heizstab an?
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.wasserspeicher_16a
alias: Heizung aus
alias: Ausschalten?
- conditions:
- condition: time
after: "16:00:00"
before: "20:00:00"
alias: Abends_Mo-Fr
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: time
after: "15:00:00"
before: "20:30:00"
weekday:
- sat
- sun
alias: Abends_Sa-So
sequence:
- if:
- condition: trigger
id: An
alias: Trigger für Anschalten?
- condition: numeric_state
entity_id: sensor.total_dc_power
above: 1500
alias: Überschuss?
- condition: numeric_state
entity_id: sensor.battery_level
above: 80
alias: Batterie > 80%
- condition: state
entity_id: switch.wasserspeicher_16a
state: "off"
alias: Heizstab aus?
then:
- service: switch.turn_on
data: {}
target:
entity_id: switch.wasserspeicher_16a
alias: Heizung an
alias: Anschalten?
- if:
- condition: trigger
id: Aus
alias: Trigger für Ausschalten?
- condition: numeric_state
entity_id: sensor.battery_charging_power
below: 5000
alias: Ladeleistung < 5kW
- condition: numeric_state
entity_id: sensor.battery_level
below: 75
alias: Batterie < 75%
- condition: state
entity_id: switch.wasserspeicher_16a
state: "on"
alias: Heizstab an?
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.wasserspeicher_16a
alias: Heizung aus
alias: Ausschalten?
alias: An/Aus Steuerung
mode: restart