Avoid json_decoder_fallback in /api/states (#100018)

This commit is contained in:
J. Nick Koston 2023-09-10 08:25:23 -05:00 committed by GitHub
parent ad4619c038
commit 5e81499855
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -270,7 +270,7 @@ class APIEntityStateView(HomeAssistantView):
# Read the state back for our response
status_code = HTTPStatus.CREATED if is_new_state else HTTPStatus.OK
resp = self.json(hass.states.get(entity_id), status_code)
resp = self.json(hass.states.get(entity_id).as_dict(), status_code)
resp.headers.add("Location", f"/api/states/{entity_id}")