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

missing 'template' in Autocharge-optimal definition #3

Open
lepricon opened this issue Aug 21, 2024 · 4 comments
Open

missing 'template' in Autocharge-optimal definition #3

lepricon opened this issue Aug 21, 2024 · 4 comments

Comments

@lepricon
Copy link

lepricon commented Aug 21, 2024

The definition on autocharge-optimal is not proper yaml, since is starting from the - sign. Probably 'template' keyword is missing. Which "include" statement you have above the pasted content?

@silencer2008
Copy link

@lepricon did you manage to solve this ? having the same issue of entity not defined.

@lepricon
Copy link
Author

Yep, divided it into two files: template.yaml and sensor.yaml and thus it concatenates correctly

@silencer2008
Copy link

would you be able to share it please ? still having issues

@top-gun
Copy link
Owner

top-gun commented Sep 14, 2024

The definition on autocharge-optimal is not proper yaml, since is starting from the - sign. Probably 'template' keyword is missing. Which "include" statement you have above the pasted content?

There is no need to seperate this into several files.

I assumed that you already have template sensors, and this is one goes to the bottom of the list. If this is your only one, it needs to be preceded by "template:" like this:

template:
  - sensor:
    - name: 'Autocharge-optimal'
      unit_of_measurement: "A"
      state: > 
        {# calculate the optimal charge current based on several parameters: #}
        {# PV yield, house battery SOC, vehicle battery SOC, Grid consumption #}
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants