Skip to content

TypeError: Object of type time is not JSON serializable after asking time/date via voice #40

Description

@JValmont

Problem
After asking "what time is it?" via Voice PE, all subsequent voice commands fail with:

TypeError: Object of type time is not JSON serializable
when serializing dict item 'time'
when serializing homeassistant.helpers.llm.IntentResponseDict item 'speech_slots'

The error occurs in entity.py line 213:
"content": json.dumps(content.tool_result)

Fix
Change line 213 in entity.py to:
"content": json.dumps(content.tool_result, default=str)

This converts non-serializable objects like time to their string representation,
matching the approach used in HA core's built-in conversation agents (fixed in 2026.2).

Environment

  • HA Core: 2026.6.1
  • Webhook Conversation: 1.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions