georg_1
22. September 2024 um 16:32
1
hallo in die runde,
ich habe eine automatisierung zum balkonkraftwerk mit speicher und wallbox zum e-auto laden geschrieben, so weit so gut. Die automatisierung soll alle 15 minuten ausgeführt werden, wenn erforderlich was ändern, den zustand und die änderungen melden. Ich werde aber mit meldungen in unregelmässigen abständen zugemüllt. Auch mit meldungen in abstand von 2 minuten, wo nur ein wert sich geändert hat, eine änderung wäre aber aufgrund der einstellungen in der automatisierung nicht erforderlich. Klar kommen auch die gewollten 15minütigen meldungen, der rest stammt aber wahrscheinlich daher, da die veränderten werte der verschiedenen sensoren erfasst werden und “als was wichtiges” auch gemeldet werden. Ich hab nichts gefunden wie ich die meldungsflut begrenzen kann…
wie geht sowas?
danke schon mal…
gruss georg
totow
22. September 2024 um 16:42
2
georg_1:
wie geht sowas?
Erstmal würde ich empfehlen das du den YAML Code der Automatisierung postest, damit wir die einmal angucken können und dann Verbesserungen vorschlagen können.
Ohne wird es schwer dir zu helfen.
Sonst würde ich sagen:
Nicht so oft Triggern
Bedingungen einbauen das du nicht zu gespamt wirst.
LG
Tobi
georg_1
22. September 2024 um 17:54
3
ja, hätte ich gleich machen können…
bitte denkt bei der betrachtung des codes daran, dass ich erst seit februar 2024 HA verwende und das meine erste automatisierung ist
- id: '1725872767688'
alias: 2024_09_11_I_dynamisches_laden_auto_95%_und_speicher_oder_verknüpft
description: ''
trigger:
- platform: time_pattern
minutes: /15
- platform: time
at: '10:00:00'
- platform: time
at: '12:00:00'
- platform: time
at: '14:00:00'
- platform: time
at: '16:00:00'
- platform: numeric_state
entity_id:
- sensor.solarinputpower
below: 200
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.solarinputpower
below: 300
for:
minutes: 2
enabled: true
- platform: numeric_state
entity_id: sensor.solarinputpower
below: 400
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.solarinputpower
above: 200
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.solarinputpower
above: 300
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.solarinputpower
above: 400
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.electriclevel
above: 20
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.electriclevel
above: 40
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.electriclevel
above: 60
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.electriclevel
above: 90
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.power_vom_netz_watt
above: 850
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.power_vom_netz_watt
below: 650
for:
minutes: 2
- platform: numeric_state
entity_id:
- sensor.power_battery_ausgang
for:
hours: 0
minutes: 15
seconds: 0
above: 50
- platform: numeric_state
entity_id:
- sensor.tmbzzzaazmd804188_battery_level
for:
hours: 0
minutes: 20
seconds: 0
above: 95
- platform: numeric_state
entity_id:
- sensor.tmbzzzaazmd804188_battery_level
for:
hours: 0
minutes: 10
seconds: 0
below: 94
- platform: numeric_state
entity_id:
- sensor.electriclevel
above: 99
condition:
- condition: time
after: '10:00:00'
before: '19:00:00'
action:
- choose:
- conditions:
- condition: time
after: '10:00:00'
before: '12:00:00'
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
below: 200
- condition: numeric_state
entity_id: sensor.power_battery_ausgang
above: 50
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
above: 95
- condition: numeric_state
entity_id: sensor.electriclevel
below: 20
sequence:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.ladestation_schalter
- action: switch.turn_on
target:
entity_id:
- switch.fritz_dect_200_16
data: {}
- data:
message: '{{ now().strftime(''%H:%M:%S'') }}.Option_1: (10-12 Uhr). Wallbox
ist AUS & PV ins haus ist EIN.'
action: notify.mobile_app_max_3
- conditions:
- condition: time
after: '10:00:00'
before: '12:00:00'
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
above: 200
- condition: numeric_state
entity_id: sensor.power_battery_ausgang
above: 50
enabled: false
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
below: 94
- condition: numeric_state
entity_id: sensor.electriclevel
above: 20
sequence:
- action: switch.turn_on
target:
entity_id:
- switch.ladestation_schalter
data: {}
- action: switch.turn_on
target:
entity_id:
- switch.fritz_dect_200_16
data: {}
- data:
message: '{{ now().strftime(''%H:%M:%S'') }}.Option_2: (10-12 Uhr). Wallbox
ist EIN & PV ins haus ist EIN.'
action: notify.mobile_app_max_3
- conditions:
- condition: time
after: '12:00:00'
before: '14:00:00'
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
below: 300
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
above: 95
- condition: numeric_state
entity_id: sensor.electriclevel
below: 50
sequence:
- action: switch.turn_off
target:
entity_id:
- switch.ladestation_schalter
data: {}
- action: switch.turn_on
target:
entity_id:
- switch.fritz_dect_200_16
data: {}
- data:
message: '{{ now().strftime(''%H:%M:%S'') }}.Option_3: (12-14 Uhr). Wallbox
ist AUS & PV ins haus ist EIN.'
action: notify.mobile_app_max_3
- conditions:
- condition: time
after: '12:00:00'
before: '14:00:00'
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
above: 300
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
below: 94
- condition: numeric_state
entity_id: sensor.electriclevel
above: 50
sequence:
- action: switch.turn_on
target:
entity_id:
- switch.ladestation_schalter
data: {}
- action: switch.turn_on
target:
entity_id:
- switch.fritz_dect_200_16
data: {}
- data:
message: '{{ now().strftime(''%H:%M:%S'') }}.Option_4: (12-14 Uhr). Wallbox
ist EIN & PV ins haus ist EIN.'
action: notify.mobile_app_max_3
- conditions:
- condition: time
after: '14:00:00'
before: '16:00:00'
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
below: 400
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
above: 95
- condition: numeric_state
entity_id: sensor.electriclevel
below: 50
- condition: numeric_state
entity_id: sensor.power_battery_ausgang
above: 50
sequence:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.ladestation_schalter
- action: switch.turn_on
target:
entity_id:
- switch.fritz_dect_200_16
data: {}
- data:
message: '{{ now().strftime(''%H:%M:%S'') }}.Option_5: (14-16 Uhr). Wallbox
ist AUS & PV ins haus ist EIN.'
action: notify.mobile_app_max_3
- conditions:
- condition: time
after: '14:00:00'
before: '16:00:00'
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
above: 400
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
below: 94
- condition: numeric_state
entity_id: sensor.electriclevel
above: 50
sequence:
- action: switch.turn_on
target:
entity_id:
- switch.ladestation_schalter
data: {}
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.fritz_dect_200_16
- data:
message: '{{ now().strftime(''%H:%M:%S'') }}.Option_6: (14-16 Uhr). Wallbox
ist EIN & PV ins haus ist EIN.'
action: notify.mobile_app_max_3
- conditions:
- condition: time
after: '16:00:00'
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
below: 200
- condition: numeric_state
entity_id: sensor.power_battery_ausgang
above: 50
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
above: 95
- condition: numeric_state
entity_id: sensor.electriclevel
below: 50
sequence:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.ladestation_schalter
- action: switch.turn_on
target:
entity_id:
- switch.fritz_dect_200_16
data: {}
- data:
message: '{{ now().strftime(''%H:%M:%S'') }}.Option_7: (nach 16 Uhr). Wallbox
ist AUS & PV ins haus ist EIN.'
action: notify.mobile_app_max_3
- conditions:
- condition: time
after: '16:00:00'
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
above: 200
- condition: numeric_state
entity_id: sensor.power_battery_ausgang
below: 50
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
below: 94
- condition: numeric_state
entity_id: sensor.electriclevel
above: 70
sequence:
- action: switch.turn_on
target:
entity_id:
- switch.ladestation_schalter
data: {}
- action: switch.turn_on
target:
entity_id:
- switch.fritz_dect_200_16
data: {}
- data:
message: '{{ now().strftime(''%H:%M:%S'') }}.Option_8: (nach 16 Uhr). Wallbox
ist EIN & PV ins haus ist AUS.'
action: notify.mobile_app_max_3
- conditions:
- condition: time
before: '19:00:00'
after: '10:00:00'
- condition: numeric_state
entity_id: sensor.electriclevel
above: 99
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id:
- switch.ladestation_schalter
- action: notify.mobile_app_cubot_max3
metadata: {}
data:
message: hauspeicher 100%, auso wird geladen
- conditions:
- condition: time
after: '10:00:00'
before: '19:00:00'
- condition: numeric_state
entity_id: sensor.power_vom_netz_watt
above: 850
sequence:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.ladestation_schalter
- action: notify.mobile_app_cubot_max3
metadata: {}
data:
message: wallbox ausgeschaltet wegen einem grossverbraucher
- data:
message: '{{ now().strftime(''%H:%M:%S'') }}. automatisierung standard_nachricht.
Solar_leistung: {{ states(''sensor.solarinputpower'') }}(W). Speicher_leistung:
{{ states(''sensor.power_battery_ausgang'') }}(W). Netz_leistung: {{ states(''sensor.power_vom_netz_watt'')
}}(W). Speicher_ladung: {{ states(''sensor.electriclevel'') }}(%). Auto_ladung:
{{ states(''sensor.tmbzzzaazmd804188_battery_level'') }}(%). Lade_strom: {{
states(''sensor.ladestation_strom_der_phase_a'') }}(A). Lade_leistung: {{
states(''sensor.ladestation_phase_a_leistung'') }}(W).'
action: notify.mobile_app_max_3
enabled: true
mode: single
georg_1
28. September 2024 um 15:09
4
ich bin jetzt etwas überrascht dass sich niemand mehr meldet? Unabhängig von der art der automatisierung, ob sie nun richtig ist, falsch, zu kompliziert oder was weiss ich - das problem mit zu vielen mitteilungen besteht nach wie vor…
ich habe nun rausgefunden, dass die automatisierung bei jeder änderung der messwerte informiert, nicht nur alle 15 minuten, wie es eigentlich gedacht war…
Kann ich da irgendwo was einstellen?
gruss georg
totow
28. September 2024 um 16:19
5
georg_1:
ich habe nun rausgefunden, dass die automatisierung bei jeder änderung der messwerte informiert, nicht nur alle 15 minuten, wie es eigentlich gedacht war…
Kann ich da irgendwo was einstellen?
Kleiner Tipp du kannst bei Automatisierung mit ID’s arbeiten, bei dem Auslösern/Trigger aktivierst du die so:
Bei den Aktionen kannst du dann mit den Auswählen Baustein arbeiten wie du es auch schon in der Automatisierung hast.
Noch ein Tipp wen du deine Automation per YAML bearbeiten möchtest mach es lieber über die UI:
wenn du direkt in der automation.yaml herumfummelst kannst du die schneller zerschießen und wird irgendwann auch unübersichtlich mit mehreren Automatisierungen drin.
Hier ist der YAML code mit den Änderungen von den Bildern:
alias: 2024_09_11_I_dynamisches_laden_auto_95%_und_speicher_oder_verknüpft
description: ""
trigger:
- platform: time_pattern
minutes: /15
id: Message
- platform: time
at: "10:00:00"
- platform: time
at: "12:00:00"
- platform: time
at: "14:00:00"
- platform: time
at: "16:00:00"
- platform: numeric_state
entity_id:
- sensor.solarinputpower
below: 200
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.solarinputpower
below: 300
for:
minutes: 2
enabled: true
- platform: numeric_state
entity_id: sensor.solarinputpower
below: 400
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.solarinputpower
above: 200
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.solarinputpower
above: 300
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.solarinputpower
above: 400
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.electriclevel
above: 20
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.electriclevel
above: 40
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.electriclevel
above: 60
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.electriclevel
above: 90
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.power_vom_netz_watt
above: 850
for:
minutes: 2
- platform: numeric_state
entity_id: sensor.power_vom_netz_watt
below: 650
for:
minutes: 2
- platform: numeric_state
entity_id:
- sensor.power_battery_ausgang
for:
hours: 0
minutes: 15
seconds: 0
above: 50
- platform: numeric_state
entity_id:
- sensor.tmbzzzaazmd804188_battery_level
for:
hours: 0
minutes: 20
seconds: 0
above: 95
- platform: numeric_state
entity_id:
- sensor.tmbzzzaazmd804188_battery_level
for:
hours: 0
minutes: 10
seconds: 0
below: 94
- platform: numeric_state
entity_id:
- sensor.electriclevel
above: 99
condition:
- condition: time
after: "10:00:00"
before: "19:00:00"
action:
- choose:
- conditions:
- condition: time
after: "10:00:00"
before: "12:00:00"
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
below: 200
- condition: numeric_state
entity_id: sensor.power_battery_ausgang
above: 50
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
above: 95
- condition: numeric_state
entity_id: sensor.electriclevel
below: 20
sequence:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.ladestation_schalter
- action: switch.turn_on
target:
entity_id:
- switch.fritz_dect_200_16
data: {}
- data:
message: >-
{{ now().strftime('%H:%M:%S') }}.Option_1: (10-12 Uhr). Wallbox
ist AUS & PV ins haus ist EIN.
action: notify.mobile_app_max_3
- conditions:
- condition: time
after: "10:00:00"
before: "12:00:00"
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
above: 200
- condition: numeric_state
entity_id: sensor.power_battery_ausgang
above: 50
enabled: false
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
below: 94
- condition: numeric_state
entity_id: sensor.electriclevel
above: 20
sequence:
- action: switch.turn_on
target:
entity_id:
- switch.ladestation_schalter
data: {}
- action: switch.turn_on
target:
entity_id:
- switch.fritz_dect_200_16
data: {}
- data:
message: >-
{{ now().strftime('%H:%M:%S') }}.Option_2: (10-12 Uhr). Wallbox
ist EIN & PV ins haus ist EIN.
action: notify.mobile_app_max_3
- conditions:
- condition: time
after: "12:00:00"
before: "14:00:00"
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
below: 300
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
above: 95
- condition: numeric_state
entity_id: sensor.electriclevel
below: 50
sequence:
- action: switch.turn_off
target:
entity_id:
- switch.ladestation_schalter
data: {}
- action: switch.turn_on
target:
entity_id:
- switch.fritz_dect_200_16
data: {}
- data:
message: >-
{{ now().strftime('%H:%M:%S') }}.Option_3: (12-14 Uhr). Wallbox
ist AUS & PV ins haus ist EIN.
action: notify.mobile_app_max_3
- conditions:
- condition: time
after: "12:00:00"
before: "14:00:00"
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
above: 300
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
below: 94
- condition: numeric_state
entity_id: sensor.electriclevel
above: 50
sequence:
- action: switch.turn_on
target:
entity_id:
- switch.ladestation_schalter
data: {}
- action: switch.turn_on
target:
entity_id:
- switch.fritz_dect_200_16
data: {}
- data:
message: >-
{{ now().strftime('%H:%M:%S') }}.Option_4: (12-14 Uhr). Wallbox
ist EIN & PV ins haus ist EIN.
action: notify.mobile_app_max_3
- conditions:
- condition: time
after: "14:00:00"
before: "16:00:00"
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
below: 400
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
above: 95
- condition: numeric_state
entity_id: sensor.electriclevel
below: 50
- condition: numeric_state
entity_id: sensor.power_battery_ausgang
above: 50
sequence:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.ladestation_schalter
- action: switch.turn_on
target:
entity_id:
- switch.fritz_dect_200_16
data: {}
- data:
message: >-
{{ now().strftime('%H:%M:%S') }}.Option_5: (14-16 Uhr). Wallbox
ist AUS & PV ins haus ist EIN.
action: notify.mobile_app_max_3
- conditions:
- condition: time
after: "14:00:00"
before: "16:00:00"
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
above: 400
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
below: 94
- condition: numeric_state
entity_id: sensor.electriclevel
above: 50
sequence:
- action: switch.turn_on
target:
entity_id:
- switch.ladestation_schalter
data: {}
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.fritz_dect_200_16
- data:
message: >-
{{ now().strftime('%H:%M:%S') }}.Option_6: (14-16 Uhr). Wallbox
ist EIN & PV ins haus ist EIN.
action: notify.mobile_app_max_3
- conditions:
- condition: time
after: "16:00:00"
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
below: 200
- condition: numeric_state
entity_id: sensor.power_battery_ausgang
above: 50
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
above: 95
- condition: numeric_state
entity_id: sensor.electriclevel
below: 50
sequence:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.ladestation_schalter
- action: switch.turn_on
target:
entity_id:
- switch.fritz_dect_200_16
data: {}
- data:
message: >-
{{ now().strftime('%H:%M:%S') }}.Option_7: (nach 16 Uhr).
Wallbox ist AUS & PV ins haus ist EIN.
action: notify.mobile_app_max_3
- conditions:
- condition: time
after: "16:00:00"
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.solarinputpower
above: 200
- condition: numeric_state
entity_id: sensor.power_battery_ausgang
below: 50
- condition: numeric_state
entity_id: sensor.tmbzzzaazmd804188_battery_level
below: 94
- condition: numeric_state
entity_id: sensor.electriclevel
above: 70
sequence:
- action: switch.turn_on
target:
entity_id:
- switch.ladestation_schalter
data: {}
- action: switch.turn_on
target:
entity_id:
- switch.fritz_dect_200_16
data: {}
- data:
message: >-
{{ now().strftime('%H:%M:%S') }}.Option_8: (nach 16 Uhr).
Wallbox ist EIN & PV ins haus ist AUS.
action: notify.mobile_app_max_3
- conditions:
- condition: time
before: "19:00:00"
after: "10:00:00"
- condition: numeric_state
entity_id: sensor.electriclevel
above: 99
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id:
- switch.ladestation_schalter
- action: notify.mobile_app_cubot_max3
metadata: {}
data:
message: hauspeicher 100%, auso wird geladen
- conditions:
- condition: time
after: "10:00:00"
before: "19:00:00"
- condition: numeric_state
entity_id: sensor.power_vom_netz_watt
above: 850
sequence:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.ladestation_schalter
- action: notify.mobile_app_cubot_max3
metadata: {}
data:
message: wallbox ausgeschaltet wegen einem grossverbraucher
- choose:
- conditions:
- condition: trigger
id:
- Message
sequence:
- data:
message: >-
{{ now().strftime('%H:%M:%S') }}. automatisierung
standard_nachricht. Solar_leistung: {{
states('sensor.solarinputpower') }}(W). Speicher_leistung: {{
states('sensor.power_battery_ausgang') }}(W). Netz_leistung: {{
states('sensor.power_vom_netz_watt') }}(W). Speicher_ladung: {{
states('sensor.electriclevel') }}(%). Auto_ladung: {{
states('sensor.tmbzzzaazmd804188_battery_level') }}(%).
Lade_strom: {{ states('sensor.ladestation_strom_der_phase_a')
}}(A). Lade_leistung: {{
states('sensor.ladestation_phase_a_leistung') }}(W).
action: notify.mobile_app_max_3
enabled: true
mode: single
LG
Tobi
georg_1
28. September 2024 um 17:48
6
danke Tobi, muss ich mir anschauen ob ich klarkomme :-), hast dir viel arbeit gemacht…
ansonsten was den yaml code betrifft, habe ich kurz mal versucht und danach nur noch über die UI…
gruss georg