#response_variable errors when used with calendar.get_events

1 messages · Page 1 of 1 (latest)

steel heart
#

I'm pulling my hair out trying to get this weeks events in to esphome, I’ve followed examples from the fourm and the same error occurs

alias: Fetch Calendar Events
description: ""
triggers:
  - minutes: /10
    trigger: time_pattern
actions:
  - target:
      entity_id: calendar.house
    data:
      duration: "168:00:00"
    response_variable: events
    action: calendar.get_events
  - target:
      entity_id: input_text.calendar_events
    data:
      value: "{{ events | to_json }}"
    action: input_text.set_value

When running the get_events action i get:

Script does not support 'response_variable' for service 'response_variable' which does not support response data.. Got {'type': 'execute_script', 'sequence': [{'target': {'entity_id': ['calendar.house']}, 'data': {'duration': '168:00:00'}, 'response_variable': 'events', 'action': 'calendar.get_events'}], 'id': 213}

When running the automation, the trace responds "Error: Script does not support 'response_variable' for service 'response_variable' which does not support response data. "

green hare
#

please format your code

lone beaconBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

green hare
#

what version of HA are you using?

#

I just ran exactly your automation and it worked fine

#

an input_text entity's state can only be 255 characters long, so trying to cram JSON data in there isn't a good strategy

steel heart
#

I'm on 2025.3.1 and i've created the input_text with

input_text:
  calendar_events:
    name: "Calendar Events"
    max: 1000
green hare
#

You can't go that high. States can only be 255 characters

#

Anyway, that's not the error you're getting above

steel heart
#

I didnt think so as my only event is only 17 characters, so even with dates or whatever

#

To me its acting like the feature was removed

steel heart
#

Checking the home assistant logs i'm presented with

2025-03-10 19:11:41.617 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Invalid data for call_service at pos 1: Script does not support 'response_variable' for service 'response_variable' which does not support response data.

2025-03-10 19:11:41.618 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [131120586673600] Error handling message: Script does not support 'response_variable' for service 'response_variable' which does not support response data.. Got {'type': 'execute_script', 'sequence': [{'action': 'calendar.get_events', 'data': {'duration': {'hours': 360, 'minutes': 0, 'seconds': 0}}, 'target': {'entity_id': ['calendar.house']}, 'response_variable': 'test'}], 'id': 158} (invalid_format) Jonny from 10.69.69.8 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0)

Pretty much the same info in another format

green hare
#

I'm at a loss because copying and pasting your automation and changing the entities works for me

#

Perhaps whatever is providing your calendar entity doesn't support that call

#

The integration must explicitly support it