Template before ":"

Hi, I want to do the following:

...
  schedules:
    - id: 5
      activated: true
      {{monday}}:
        startTime:
...

The value monday should come from a template, like

  schedules:
    - id: 5
      activated: true
      {{ now().strftime('%A') }}:
        startTime: >

Is there any way to do something like this?

it’s not possible to template fields. Also, templates can only be used in specific places. Those places are identifiable via the documentation. If the field says template, then it allows jinja templates.

1 Like