Skip to content
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

Event not JSON serializable - Recorder #18919

Closed
wants to merge 1 commit into from
Closed

Event not JSON serializable - Recorder #18919

wants to merge 1 commit into from

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Dec 2, 2018

Description:

Not all events JSON serializable. This mainly applies to service_call events for which templates aren't rendered yet. Since the template doesn't have knowledge of hass yet (at the moment of the service_call), it can't render itself either. See the issue linked below for an example.

Originally I though of rendering it after the serialization failed (a00bd34), but I think that would overly complicate things. That's why I would propose changing the warning message to a debug one.

A assume similar chases would apply from States.

Related issue (if applicable): fixes #18900

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

* Event / State not serializable
@ghost ghost assigned cdce8p Dec 2, 2018
@ghost ghost added the in progress label Dec 2, 2018
@balloob
Copy link
Member

balloob commented Dec 2, 2018

All events should be JSON serializable. If an event is not JSON serializable, it's a bug.

Service schemas should not use validators that produce data types that are not serializable. This is breaking a lot of other things too, like if we would want to send the event over the websocket connection or when using MQTT event stream.

@cdce8p cdce8p closed this Dec 2, 2018
@ghost ghost removed the in progress label Dec 2, 2018
@cdce8p cdce8p deleted the recorder-warning branch December 2, 2018 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Recorder - Event not JSON serializable
3 participants