mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Avoid json_decoder_fallback in /api/states (#100018)
This commit is contained in:
parent
ad4619c038
commit
5e81499855
@ -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}")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user