evcc-io / docs

evcc documentation
https://docs.evcc.io/
MIT License
39 stars 125 forks source link

consistant grünstromindex examples #673

Closed naltatis closed 4 days ago

naltatis commented 4 days ago

fixes https://github.com/evcc-io/docs/issues/672

mpw96 commented 3 days ago

@naltatis Now I'm really confused. The evcc.yaml of the demo instance shows this:

  co2:
    type: grünstromindex
    zip: 12349

And it's not only grünstrom, that was just an example. What is the desired way of configuring all co2 tariffs?

naltatis commented 3 days ago

@mpw96 both ways work and will work in the future.

Some background: The type: template notation uses our template abstraction that adds metadata and is the basis for generating our documentation, cli assistant and config ui. See https://github.com/evcc-io/evcc/blob/master/templates/definition/tariff/gruenstromindex.yaml#L13-L15

type: gruenstromindex is the concrete implementation (go file). In case of Grünstromindex its a 1:1 match. We have 1 template that maps to 1 specific implmentation. For other devices or tariffs its more complex. A lot of meter templates e.g. use type: modbus under the hood.