From 586208b3eda20f527b83c2be07fe9ca8506ca63e Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 27 Aug 2016 07:43:42 +0100 Subject: [PATCH] Fix JSON encoder issue in recorder --- homeassistant/components/recorder/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/recorder/models.py b/homeassistant/components/recorder/models.py index 6e3e2db064d..671623ec564 100644 --- a/homeassistant/components/recorder/models.py +++ b/homeassistant/components/recorder/models.py @@ -92,7 +92,8 @@ class States(Base): # type: ignore else: dbstate.domain = state.domain dbstate.state = state.state - dbstate.attributes = json.dumps(dict(state.attributes)) + dbstate.attributes = json.dumps(dict(state.attributes), + cls=JSONEncoder) dbstate.last_changed = state.last_changed dbstate.last_updated = state.last_updated