diff --git a/templates/definition/vehicle/teslamate.yaml b/templates/definition/vehicle/teslamate.yaml index cd3ab2d86f..a524aa5928 100644 --- a/templates/definition/vehicle/teslamate.yaml +++ b/templates/definition/vehicle/teslamate.yaml @@ -14,33 +14,42 @@ params: de: Fahrzeug-ID en: Vehicle ID default: 1 + - name: timeout + default: 1h render: | type: custom {{- include "vehicle-common" . }} soc: source: mqtt topic: teslamate/cars/{{ .id }}/battery_level - timeout: 720h # 30d + timeout: {{ .timeout }} status: source: combined plugged: source: mqtt topic: teslamate/cars/{{ .id }}/plugged_in - timeout: 720h # 30d + timeout: {{ .timeout }} charging: - source: mqtt - topic: teslamate/cars/{{ .id }}/charger_actual_current - timeout: 720h # 30d + source: go + script: | + charging_state == "Charging" + in: + - name: charging_state + type: string + config: + source: mqtt + topic: teslamate/cars/{{ .id }}/charging_state + timeout: {{ .timeout }} range: source: mqtt topic: teslamate/cars/{{ .id }}/rated_battery_range_km - timeout: 720h # 30d + timeout: {{ .timeout }} odometer: source: mqtt topic: teslamate/cars/{{ .id }}/odometer - timeout: 720h # 30d + timeout: {{ .timeout }} limitsoc: source: mqtt topic: teslamate/cars/{{ .id }}/charge_limit_soc - timeout: 720h - features: ["coarsecurrent"] + timeout: {{ .timeout }} + features: ["coarsecurrent"] \ No newline at end of file