mirror of
https://github.com/home-assistant/core.git
synced 2025-08-07 06:35:10 +02:00
Avoid json_decoder_fallback in /api/states (#100018)
This commit is contained in:
@@ -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}")
|
||||
|
||||
|
Reference in New Issue
Block a user