Hallo liebe HA Gemeinde,
vorweg ich bin bin totaler newbie in Sachen HA, habt bitte dementsprechend Nachsicht
Ich bin ja schon stolz es überhaupt bis dahin wo ich nun hänge geschafft zu haben, aber nun brauche ich fachkundigen Rat.
Ich habe HA vor wenigen Wochen erfolgreich eingerichtet und möchte mir diese Tesla Ladesteuerung implementieren:
Ich habe alle erforderlichen Schritte der Anleitung durchgeführt, mein hartnäckiges Problem ist nun, dass die Entität “Autocharge-Optimal” leider im Dashboard als “nicht verfügbar” angezeigt wird.
Hier mal meine configuration.yaml mit dem angepassten template:
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
homeassistant:
packages: !include_dir_named integrations
template:
- sensor:
- name: 'Autocharge-optimal'
unit_of_measurement: ""
state: >
{% set Battery = states('sensor.battery_level')|float %}
{% set PV = states('sensor.total_dc_power')|float -500 %}
{% set Charge = states('sensor.teslanator_charger_power')|float %}
{% set Throttle = states('input_number.teslanator_charge_brake') |float %}
{% set Endoffastcharge = states('input_number.num_battery_min_home') |float %}
{# PV/230 is the current in a one phase system. For three-phase charging divide by 3! #}
{% set PVAMP = (PV/230/3) %}
{# While the house battery is below 90% ist, use only 80% of the output so the house battery will charge, too #}
{% if Battery<90 %} {% set PVAMP = (PVAMP*0.8) %} {% endif %}
{# When the house battery is above "Endoffastcharge", use at least 5A. When starting, use +5 for hysteresis #}
{% if (PVAMP<6) and (Battery>Endoffastcharge+5 ) %} {% set PVAMP = 6 %} {% endif %}
{% if (PVAMP<6) and (Battery>Endoffastcharge) and (Charge > 0) %} {% set PVAMP = 6 %} {% endif %}
{# Under 40%, charge only the house battery, not the car. 3% hysteresis: Don't turn on until we reach 43%. #}
{% if (Battery<43) and (Charge==0) and (PVAMP<6) %} {% set PVAMP = 0 %} {% endif %}
{% if (Battery<40) and (Charge>0) %} {% set PVAMP = 0 %} {% endif %}
{# Exception: When the PV output is really high, allow charging so we don't feed to the grid early #}
{% if (PVAMP>6) and (Battery<40) %} {% set PVAMP = 3 %} {% endif %}
{# Don't start charging under 3A because it's not efficient. #}
{% if (PVAMP<3) and (Charge==0) %} {% set PVAMP = 0 %} {% endif %}
{# Under very high load, like cooking at noon, use throttle. Throttle is controlled by an automation #}
{% set PVAMP = PVAMP - Throttle %}
{# avoid negative numbers. They are technically irrelevant, but irritating #}
{% if PVAMP<0 %} {% set PVAMP = 0%} {% endif %} <-- Die hier ist neu!
{{ PVAMP|int }}
Ich habe die darin enthaltenen Entitäten der Vorlage alle entsprechend ersetzt durch die meinigen meiner PV Anlage und meines Teslas. Hatte mit Watchman auch mal überprüft, da liefert er:
-== Watchman Report ==-
-== Congratulations, all 7 services from your config are available!
-== Missing 2 entity(ies) from 64 found in your config:
+--------------------------------+---------+--------------------------------------------------------------+
| Entity ID | State | Location |
+--------------------------------+---------+--------------------------------------------------------------+
| sensor.autocharge_optimal | unavail | automations.yaml:31,35 |
| binary_sensor.charge_no_curren | unknown | automations.yaml:66 |
| t | | |
+--------------------------------+---------+--------------------------------------------------------------+
-== Report created on 05 Nov 2023 11:23:06
-== Parsed 11 files in 0.36s., ignored 0 files
-== Generated in: 0.01s. Validated in: 0.00s.
Der Sensor Charge-no-current enthält “autocharge-optimal” (siehe Anleitung), deshalb ist dieser wohl auch “nicht verfügbar”.
Was ich seltsam finde: Wenn ich mein entsprechend angepasstes Template aus der configuration.yaml unter Entwicklerwerkzeuge/Vorlage eingebe, dann funktioniert es und liefert brav die gewünschten Ladestrom Ampere Werte zwischen 0 und 16.
In diesem Fall 0 weil kaum PV Ertrag:
Die 5 Entitäten die im Template enthalten sind´, sind ja laut Watchman scheints alle verfügbar und liefern numerische Werte soweit ich das beurteilen kann. Sonst würde es ja auch unter Entwicklerwerkzeuge/Vorlage nicht gehen.
Vielleicht hat hier ja jemand eine Idee was ich noch probieren kann, ich komme da einfach nicht mehr weiter leider
Viele Grüße!