Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vehicle Mercedes does not work with type: template #14460

Closed
ReneNulschDE opened this issue Jun 18, 2024 · 2 comments · Fixed by #14465
Closed

Vehicle Mercedes does not work with type: template #14460

ReneNulschDE opened this issue Jun 18, 2024 · 2 comments · Fixed by #14465
Labels
bug Something isn't working

Comments

@ReneNulschDE
Copy link
Contributor

Describe the bug

When you configure a vehicle with type: template, template: mercedes, the vehicle does not work. The config value region is not transfered from the template to the mercedes component.

Steps to reproduce

  1. Create the following config entry in the evcc.yaml
vehicles:
  - name: name-car-1
    type: template
    template: mercedes
    title: title-car-1
    user: test123
    region: EMEA
    accesstoken: at
    refreshtoken: rt
    vin: W1
  1. Set a break point in the mercedes.go line 39
  2. Start the debugger and check that cc.Region is empty
  3. Change the config to:
  - name: name-car-1
    type: mercedes
    title: title-car-1
    user: test@intranet
    region: EMEA
    tokens:
     access: at
     refresh: rt
    vin: W1
  1. Start the debugger and check that cc.Region has the value EMEA

Looks like it gets lost in templates.template.RenderTemplate (tmpl.execute, line 347)

Configuration details

See steps to repro

Log details

n/a

What type of operating system are you running?

Linux

Version

current master branch

@VolkerK62
Copy link
Contributor

it is missing within the render part of the template

@andig
Copy link
Member

andig commented Jun 19, 2024

Region fehlt in https://github.com/evcc-io/evcc/blob/master/templates/definition/vehicle/mercedes.yaml#L39. Hab ich ggf bei der Vereinfachung übersehen.

@andig andig added the bug Something isn't working label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants