Skip to content

Schedule helper returns different response variable in Developer Tools - action than in automation #144859

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

Open
gijsstat opened this issue May 14, 2025 · 1 comment

Comments

@gijsstat
Copy link

The problem

This is my first bug report so apologies if I misplaced or did something else wrong. I am extremely grateful for all the work going into Home Assistant.

When writing a template for an automation using a ScheduIe helper I was debugging using Developer tools -actions. This returns as a template response variable the following:

{% set schedules = {"schedule.boiler_schedule":{"monday":[{"from":"09:00:00","to":"20:00:00"}],"tuesday":[{"from":"09:00:00","to":"20:00:00"}],"wednesday":[{"from":"09:00:00","to":"20:00:00"}],"thursday":[{"from":"09:00:00","to":"20:00:00"}],"friday":[{"from":"09:00:00","to":"20:00:00"}],"saturday":[{"from":"09:00:00","to":"20:00:00"}],"sunday":[{"from":"09:00:00","to":"20:00:00"}]}} %}

When I use the same call in an automation:

  - action: schedule.get_schedule
    target:
      entity_id:
        - schedule.boiler_schedule
    response_variable: schedules
    data: {}

I get the following respose (snippet):

schedules:
  schedule.boiler_schedule:
    monday:
      - from:
          __type: <class 'datetime.time'>
          isoformat: '09:00:00'
        to:
          __type: <class 'datetime.time'>
          isoformat: '20:00:00'
    tuesday:
      - from:
          __type: <class 'datetime.time'>
          isoformat: '09:00:00'

So to my eye it seems that the Developer tools -actions route provides strings, when the method via actions provides datetime.time type variables. Obviously this matters in downstream coding which is why I picked this up.

It may be the expected behaviour but for me it was a surprise and I could not find any reports on it.

What version of Home Assistant Core has the issue?

core-2025.4.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Schedule

Link to integration documentation on our website

https://www.home-assistant.io/integrations/schedule/

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

Additional information

No response

@home-assistant
Copy link

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (schedule) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of schedule can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign schedule Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


schedule documentation
schedule source
(message by IssueLinks)

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

No branches or pull requests

1 participant