Skip to content

Commit 2298017

Browse files
committed
state.set() copies existing attributes; workaround for #87
1 parent 0f30165 commit 2298017

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/pyscript/state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def set(cls, var_name, value=None, new_attributes=None, **kwargs):
171171

172172
if new_attributes is None:
173173
if state_value:
174-
new_attributes = state_value.attributes
174+
new_attributes = state_value.attributes.copy()
175175
else:
176176
new_attributes = {}
177177

0 commit comments

Comments
 (0)