1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Make State class immutable

This commit is contained in:
Paulus Schoutsen
2016-02-09 23:27:01 -08:00
parent 70a528c04b
commit b0948bef5f
6 changed files with 10 additions and 29 deletions

View File

@@ -85,7 +85,7 @@ def reproduce_state(hass, states, blocking=False):
# We group service calls for entities by service call
# json used to create a hashable version of dict with maybe lists in it
key = (service_domain, service,
json.dumps(state.attributes, sort_keys=True))
json.dumps(dict(state.attributes), sort_keys=True))
to_call[key].append(state.entity_id)
for (service_domain, service, service_data), entity_ids in to_call.items():