Fix JSON encoder issue in recorder

pull/2980/head
Paulus Schoutsen 2016-08-27 07:43:42 +01:00
parent 3fa1963345
commit 586208b3ed
1 changed files with 2 additions and 1 deletions

View File

@ -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