Ladeautomation

Juergen

Member
hallo

mag mal jmd schauen ob die Logik soweit ok ist ?
Code:
alias: id4_akku
description: ""
trigger: []
condition: []
action:
  - action: automation.turn_off
    target:
      entity_id: automation.id_4_ladestopp
    data:
      stop_actions: true
  - device_id: c63d78e89c76fce0814f68cfb379f72e
    domain: select
    entity_id: 7ce6efab536bc2f63eff1e49d9df9caf
    type: select_option
    option: Eco
  - choose:
      - conditions:
          - condition: numeric_state
            entity_id: sensor.id_4_pure_performance_state_of_charge
            above: 79
        sequence:
          - action: automation.turn_on
            target:
              entity_id: automation.id_4_ladestopp
            data: {}
mode: single
 
Ich mach das so, mittels einem Nummer Helfer, der den Zählerstand beim Start speichert und einem Templatesensor, der die DIfferenz anzeigt (kann man sicher auch einen Verbrauchszähler nehmen).

Automation Start (auch zu starten durch Knopf auf Dashboard)
YAML:
alias: Auto laden starten per Button oder Sprache
description: beim Start Zählerstand merken, um die Differenz anzuzeigen
trigger:
  - platform: conversation
    command:
      - Lade das Auto
condition: []
action:
  - target:
      entity_id: input_number.auto_zahlerstand_ladebeginn
    data:
      value: "{{ states('sensor.shelly_shsw_pm_a4cf12f3d281_total_consumption') }}"
    action: input_number.set_value
  - action: switch.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: switch.shelly_shsw_pm_a4cf12f3d281
  - action: automation.turn_on
    data: {}
    target:
      entity_id: automation.auto_laden_beenden
mode: single

Automation Stop
YAML:
alias: Auto laden beenden
description: >-
  ausschalten, wenn gewünschter Füllstand erreicht oder Laden beendet (5min
  weniger als 200 W)
trigger:
  - platform: template
    value_template: >-
      {{ (states('sensor.auto_aktueller_ladezyklus')|float >=
      states('input_number.lademenge')|float) }}
    alias: "Wenn geladene Energie > eingestellter Lademenge "
  - platform: numeric_state
    entity_id: sensor.shelly_shsw_pm_a4cf12f3d281_current_consumption
    for:
      hours: 0
      minutes: 5
      seconds: 0
    below: "200"
    alias: "Laden beendet"
condition:
  - condition: or
    conditions:
      - condition: state
        alias: Auto nicht voll laden
        entity_id: input_boolean.voll_laden
        state: "off"
      - condition: numeric_state
        alias: Verbrauch unter 200 Watt
        entity_id: sensor.shelly_shsw_pm_a4cf12f3d281_current_consumption
        below: "200"
action:
  - action: switch.turn_off
    metadata: {}
    data: {}
    target:
      entity_id: switch.shelly_shsw_pm_a4cf12f3d281
  - action: notify.xxx
    data:
      message: "Auto geladen: {{states(\"sensor.auto_aktueller_ladezyklus\")}} kWh"  
  - action: automation.turn_off
    target:
      entity_id: automation.auto_laden_beenden
    data: {}
mode: single

Templatesensor
YAML:
  - name: auto_aktueller_ladezyklus
    unique_id: '1b7db402-ntrnt-44ad-8b5b-ae1234567890'
    icon: mdi:gauge-full
    state: "{{ (states('sensor.shelly_shsw_pm_a4cf12f3d281_total_consumption')|float(0) - states('input_number.auto_zahlerstand_ladebeginn')|float(0))|round(2) }}"
    unit_of_measurement: "kWh"
    device_class: energy
    state_class: total_increasing
    availability: "{{ is_number(states('sensor.shelly_shsw_pm_a4cf12f3d281_total_consumption')) }}"
 

Zurzeit aktive Besucher

Letzte Anleitungen

Statistik des Forums

Themen
5.283
Beiträge
52.555
Mitglieder
5.037
Neuestes Mitglied
galaxyaner
Zurück
Oben