Service Response: "Error rendering data template: Result is not a Dictionary"

Dear community,

I want to create an “input text” which shows to me when the next wake-up alarm will happen. For that I’m using the new “workday.check_date”-service with its response. Unfortunately, I always get “Error rendering data template: Result is not a Dictionary”. Browsing this forum did not bring a solution so far.
So I add the relevant part of my YAML-code here. I hope I can get a few good hints.

- repeat:
    until:
      - condition: template
        value_template: "{{ wd_chk == true }}"
    sequence:
      - service: workday.check_date
        target:
          entity_id: binary_sensor.workday_sensor
        data: >-
          {%- set next_wd = as_datetime(states("sensor.date") + "T" + states("input_datetime.weckzeit")) + timedelta(days=repeat.index) %}
          {{ as_timestamp(next_wd)|timestamp_custom("%Y-%m-%d") }}
        response_variable: wd_chk
      - service: input_text.set_value
        data:
          value: '{{ as_timestamp(next_wd)|timestamp_custom("%a, %d.%m. %H:%M") }}'
        target:
          entity_id: input_text.nachster_wecker

THANKS very much for your support!

After a little more investigation I found the solution. Please find the code here in case you need it for your project:

  - repeat:
      until:
        - condition: template
          value_template: >-
            {{ (wd_chk["binary_sensor.workday_sensor"].workday) or (repeat.index
            > 6) }}
      sequence:
        - service: workday.check_date
          target:
            entity_id: binary_sensor.workday_sensor
          data:
            check_date: >-
              {%- set next_alarm = as_datetime(states("sensor.date") + "T" + states("input_datetime.weckzeit")) + timedelta(days=repeat.index) %}
              {{ as_timestamp(next_alarm)|timestamp_custom("%Y-%m-%d") }}
          response_variable: wd_chk
        - service: input_text.set_value
          data:
            value: >-
              {%- set next_alarm = as_datetime(states("sensor.date") + "T" + states("input_datetime.weckzeit")) + timedelta(days=repeat.index) %}
              {{ weekdays[as_timestamp(next_alarm)|timestamp_custom("%w")|int] + ", " + as_timestamp(next_alarm)|timestamp_custom("%d.%m. %H:%M") }}
          target:
            entity_id: input_text.nachster_wecker

thanks, very useful