Skip to content

Commit 78dd615

Browse files
committed
Merge branch 'dev' of https://github.com/AppDaemon/appdaemon into dev
2 parents ed080b8 + a52d993 commit 78dd615

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

appdaemon/state.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,8 @@ async def set_namespace_state(self, namespace: str, state: dict[str, Any], persi
879879
self.state[namespace].update(state)
880880
else:
881881
# first in case it had been created before, it should be deleted
882-
await self.remove_namespace(namespace)
882+
if isinstance(self.state.get(namespace), utils.PersistentDict):
883+
await self.remove_persistent_namespace(namespace, self.state[namespace])
883884
self.state[namespace] = state
884885

885886
def update_namespace_state(self, namespace: str | list[str], state: dict):

0 commit comments

Comments
 (0)