Rat und Tat rings um Home Assistant Automationen.
SaHi
Beiträge: 5 Registriert: Fr 2. Feb 2024, 15:25
Has thanked: 1 time
Beitrag
von SaHi » Fr 2. Feb 2024, 15:33
Hallo zusammen,
ich benötige Hilfe um einen 3 Stufigen Heizstab mit 3 Shellys zu steuern nach PV Leistung.
Die Leistungsstufen sind 500W 1000W 2000W.
Leider bin ich nicht in der Lage eine Automatisierung zu erstellen.
Vielleicht hat ja jemand so etwas schon gemacht.
Habe die Steuerung von diesem Thread schon mal abgewandelt eingesetzt bei einer anderen Anwendung wo die Stäbe 400W hatten.
viewtopic.php?t=487
Leider kann ich die Leistungsstufen nicht hineinbringen.
Vielen Dank.
Dampf
Beiträge: 302 Registriert: So 22. Jan 2023, 10:06
1
Has thanked: 97 times
Been thanked: 52 times
Beitrag
von Dampf » Fr 2. Feb 2024, 17:20
Moin Moin,
Es wäre gut zu wissen um was für einen Heizstab genau es sich handelt (Hersteller + Model) und wie er genau funktioniert.
Dampf
HA OS auf Beelink SEi12 Mini PC, i5-1235U,16GB RAM, Zigbee2mqtt mit SONOFF Zigbee 3.0 USB Dongle Plus
SaHi
Beiträge: 5 Registriert: Fr 2. Feb 2024, 15:25
Has thanked: 1 time
Beitrag
von SaHi » Fr 2. Feb 2024, 18:51
Hallo,
was es genau für ein Stab ist kann ich nicht sagen.
Nur das ich die einzelnen Wendel mit jeweils einem Shelly 1 PM schalten möchte und es dann 500W bei Shelly 1 und 1000W bei Shelly2 und 2000W bei Shelly 3 sind.
Je nach PV Überschuss sollen die einzelnen Shellys eingeschaltet werden und auch wieder aus.
Dampf
Beiträge: 302 Registriert: So 22. Jan 2023, 10:06
1
Has thanked: 97 times
Been thanked: 52 times
Beitrag
von Dampf » Fr 2. Feb 2024, 19:13
Da waren schon wichtige Infos dabei (3 Einzeln geschaltete Heizwendel).
Zeigt mal die Automation vom 400W Heizstab her.
Da lässt sich bestimmt was draus basteln.
HA OS auf Beelink SEi12 Mini PC, i5-1235U,16GB RAM, Zigbee2mqtt mit SONOFF Zigbee 3.0 USB Dongle Plus
SaHi
Beiträge: 5 Registriert: Fr 2. Feb 2024, 15:25
Has thanked: 1 time
Beitrag
von SaHi » Fr 2. Feb 2024, 20:30
Code: Alles auswählen
alias: Heizstabsteuerung
description: ""
trigger:
- platform: numeric_state
entity_id:
- sensor.total_power
below: -450
id: Einschalten
- platform: numeric_state
entity_id: sensor.total_power
id: Ausschalten
above: "10"
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Einschalten
- condition: numeric_state
entity_id: sensor.total_power
below: "-450"
sequence:
- repeat:
count: "3"
sequence:
- condition: numeric_state
entity_id: sensor.total_power
below: "-450"
- service: switch.turn_on
data: {}
target:
entity_id: >
{% if
expand('switch.heizstab1bis3')|selectattr('state','eq','on')
| list | count == 0 %}
switch.61
{% elif
expand('switch.heizstab1bis3')|selectattr('state','eq','on')
| list | count == 1 %}
switch.62
{% elif
expand('switch.heizstab1bis3')|selectattr('state','eq','on')
| list | count == 2 %}
switch.63
{% endif %}
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- conditions:
- condition: trigger
id: Ausschalten
sequence:
- repeat:
count: "3"
sequence:
- condition: numeric_state
entity_id: sensor.total_power
above: "10"
- service: switch.turn_off
data: {}
target:
entity_id: >
{% if
expand('switch.heizstab1bis3')|selectattr('state','eq','on')
| list | count == 3 %}
switch.63
{% elif
expand('switch.heizstab1bis3')|selectattr('state','eq','on')
| list | count == 2 %}
switch.62
{% elif
expand('switch.heizstab1bis3')|selectattr('state','eq','on')
| list | count == 1 %}
switch.61
{% endif %}
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
default: []
mode: restart
trace:
stored_traces: 10000
Dampf
Beiträge: 302 Registriert: So 22. Jan 2023, 10:06
1
Has thanked: 97 times
Been thanked: 52 times
Beitrag
von Dampf » Sa 3. Feb 2024, 13:55
Ich muss zugeben: Mit deiner und der Automatisierung aus dem anderen Thread komm ich nicht zurecht.
Ich hab hier mal meine Version gebaut, inkl. Überhizungsschutz 75 Grad. Mangels PV Anlage und Shellys habe ich mir Helfer erstellt. Die Helfer „Eingabe boolescher Wert“ kannst du durch eine ‚Aktion: Schalter‘ (für die Shellys) ersetzten. Und bei der Kesseltemperatur kannst du eine entsprechende Thermometer-Entität einsetzten. Das sollte im Visuellen Editor kein Problem sein
Verzögerungen zur jeweiligen Bedingung oder Aktion kannst du auch entsprechend einfügen.
Code: Alles auswählen
alias: 3-Fach Heizstabsteuerung
description: ""
trigger:
- platform: numeric_state
entity_id:
- input_number.pv_uberschuss
above: 500
below: 1000
id: PV Überschuss 500W bis 999W
- platform: numeric_state
entity_id:
- input_number.pv_uberschuss
above: 999
below: 2000
id: PV Überschuss - 1000W bis 1999W
- platform: numeric_state
entity_id:
- input_number.pv_uberschuss
above: 1999
alias: PV Überschuss - min 2000W
id: PV Überschuss - min 2000W
- platform: numeric_state
entity_id:
- input_number.pv_kesseltemperatur
above: 75
alias: Kesseltemperatur über 75 Grad
id: Kesseltemperatur über 75 Grad
condition: []
action:
- choose:
- conditions:
- condition: and
conditions:
- condition: trigger
id:
- PV Überschuss 500W bis 999W
- condition: numeric_state
entity_id: input_number.pv_kesseltemperatur
below: 75
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.pv_shelly_stab_1_500w
data: {}
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.pv_shelly_stab_2_1000w
- input_boolean.pv_shelly_stab_3_2000w
data: {}
alias: Stab 1 AN / Stäbe 2 und 3 AUS (500W)
- conditions:
- condition: and
conditions:
- condition: trigger
id:
- PV Überschuss - 1000W bis 1999W
- condition: numeric_state
entity_id: input_number.pv_kesseltemperatur
below: 75
sequence:
- service: input_boolean.turn_on
target:
entity_id:
- input_boolean.pv_shelly_stab_1_500w
- input_boolean.pv_shelly_stab_2_1000w
data: {}
- service: input_boolean.turn_off
target:
entity_id: input_boolean.pv_shelly_stab_3_2000w
data: {}
alias: Stäbe 1 und 2 AN / Stab 3 AUS (1000W)
- conditions:
- condition: and
conditions:
- condition: trigger
id:
- PV Überschuss - min 2000W
- condition: numeric_state
entity_id: input_number.pv_kesseltemperatur
below: 75
sequence:
- service: input_boolean.turn_on
target:
entity_id:
- input_boolean.pv_shelly_stab_1_500w
- input_boolean.pv_shelly_stab_2_1000w
- input_boolean.pv_shelly_stab_3_2000w
data: {}
alias: Stäbe 1, 2 und 3 AN (2000W)
- conditions:
- condition: trigger
id:
- Kesseltemperatur über 75 Grad
sequence:
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.pv_shelly_stab_1_500w
- input_boolean.pv_shelly_stab_2_1000w
- input_boolean.pv_shelly_stab_3_2000w
data: {}
alias: Kesseltemperatur über 75 Grad (Überhitzungsschutz)
mode: restart
HA OS auf Beelink SEi12 Mini PC, i5-1235U,16GB RAM, Zigbee2mqtt mit SONOFF Zigbee 3.0 USB Dongle Plus
SaHi
Beiträge: 5 Registriert: Fr 2. Feb 2024, 15:25
Has thanked: 1 time
Beitrag
von SaHi » Sa 3. Feb 2024, 23:08
Hallo,
vielen Dank für die Automation.
Ich habe erstmal die Temperaturbegrenzung weggelassen, da der Stab selbst ein Thermostat hat.
Hier schaltet der Stab dann automatisch ab bei eingestelltem Wert.
Habe die Automation umgebaut so wie ich es denke das es für mich passt.
Vielen Dank für die Vorlage.
Werde ich bei Sonnenschein in den nächsten Tagen testen.
Hier mein Code:
Code: Alles auswählen
alias: 3-Fach Heizstabsteuerung
description: ""
trigger:
- platform: numeric_state
entity_id:
- input_number.pv_uberschuss
above: 510
below: 990
id: PV Überschuss 500W bis 1000W
- platform: numeric_state
entity_id:
- input_number.pv_uberschuss
above: 1010
below: 1490
id: PV Überschuss - 1000W bis 1500W
- platform: numeric_state
entity_id:
- input_number.pv_uberschuss
above: 1510
below: 1990
id: PV Überschuss - 1500W bis 2000W
- platform: numeric_state
entity_id:
- input_number.pv_uberschuss
above: 2010
id: PV Überschuss - 2000W bis 2500W
below: 2490
- platform: numeric_state
entity_id:
- input_number.pv_uberschuss
above: 2510
id: PV Überschuss - 2500W bis 3000W
below: 2990
- platform: numeric_state
entity_id:
- input_number.pv_uberschuss
above: 3010
id: PV Überschuss - 3000W bis 3500W
below: 3490
- platform: numeric_state
entity_id:
- input_number.pv_uberschuss
above: 3510
id: PV Überschuss - über 3500W
condition: []
action:
- choose:
- conditions:
- condition: and
conditions:
- condition: trigger
id:
- PV Überschuss 500W bis 1000W
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.pv_shelly_stab_1_500w
data: {}
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.pv_shelly_stab_2_1000w
- input_boolean.pv_shelly_stab_3_2000w
data: {}
alias: Stab 1 AN / Stäbe 2 und 3 AUS (500W)
- conditions:
- condition: and
conditions:
- condition: trigger
id:
- PV Überschuss - 1000W bis 1500W
sequence:
- service: input_boolean.turn_on
target:
entity_id:
- input_boolean.pv_shelly_stab_2_1000w
data: {}
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.input_boolean_pv_shelly_stab_1_500w
- input_boolean.input_boolean_pv_shelly_stab_3_2000w
data: {}
alias: Stab 2 AN / Stäbe 1 und 3 AUS (1000W)
- conditions:
- condition: and
conditions:
- condition: trigger
id:
- PV Überschuss - 1500W bis 2000W
sequence:
- service: input_boolean.turn_on
target:
entity_id:
- input_boolean.input_boolean_pv_shelly_stab_1_500w
- input_boolean.input_boolean_pv_shelly_stab_2_1000w
data: {}
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.input_boolean_pv_shelly_stab_3_2000w
data: {}
alias: Stäbe 1 und 2 AN / Stab 3 AUS (1500W)
- conditions:
- condition: and
conditions:
- condition: trigger
id:
- PV Überschuss - 2000W bis 2500W
sequence:
- service: input_boolean.turn_on
target:
entity_id:
- input_boolean.input_boolean_pv_shelly_stab_3_2000w
data: {}
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.input_boolean_pv_shelly_stab_1_500w
- input_boolean.input_boolean_pv_shelly_stab_2_1000w
data: {}
alias: Stab 3 AN / Stäbe 1 und 2 AUS (2000W)
- conditions:
- condition: and
conditions:
- condition: trigger
id:
- PV Überschuss - 2500W bis 3000W
sequence:
- service: input_boolean.turn_on
target:
entity_id:
- input_boolean.input_boolean_pv_shelly_stab_3_2000w
- input_boolean.input_boolean_pv_shelly_stab_1_500w
data: {}
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.input_boolean_pv_shelly_stab_2_1000w
data: {}
alias: Stäbe 1 und 3 AN / Stab 2 AUS (2500W)
- conditions:
- condition: and
conditions:
- condition: trigger
id:
- PV Überschuss - 3000W bis 3500W
sequence:
- service: input_boolean.turn_on
data: {}
target:
entity_id:
- input_boolean.input_boolean_pv_shelly_stab_2_1000w
- input_boolean.input_boolean_pv_shelly_stab_3_2000w
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.input_boolean_pv_shelly_stab_1_500w
alias: Stäbe 2 und 3 AN / Stab 1 AUS (3000W)
- conditions:
- condition: and
conditions:
- condition: trigger
id:
- PV Überschuss - über 3500W
sequence:
- service: input_boolean.turn_on
data: {}
target:
entity_id:
- input_boolean.input_boolean_pv_shelly_stab_1_500w
- input_boolean.input_boolean_pv_shelly_stab_2_1000w
- input_boolean.input_boolean_pv_shelly_stab_3_2000w
alias: Stäbe 1,2 und 3 AN (3500W)
mode: restart
trace:
stored_traces: 10000