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
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
timeto their string representation,matching the approach used in HA core's built-in conversation agents (fixed in 2026.2).
Environment