mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Convert States to dicts via as_dict only once (#41208)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
This commit is contained in:
@@ -201,10 +201,7 @@ async def test_get_states(hass, websocket_client):
|
||||
|
||||
states = []
|
||||
for state in hass.states.async_all():
|
||||
state = state.as_dict()
|
||||
state["last_changed"] = state["last_changed"].isoformat()
|
||||
state["last_updated"] = state["last_updated"].isoformat()
|
||||
states.append(state)
|
||||
states.append(state.as_dict())
|
||||
|
||||
assert msg["result"] == states
|
||||
|
||||
|
||||
Reference in New Issue
Block a user