Protect against discovered miss-use of state

This commit is contained in:
Marc Di Luzio 2024-08-13 23:32:28 +01:00
parent 87a0c8f4b6
commit f2d7e1d490
3 changed files with 6 additions and 6 deletions

View file

@ -174,7 +174,7 @@ def datetime_to_ts(ts: datetime) -> str:
class State():
def __init__(self, data: dict = _EMPTY_DICT):
def __init__(self, data: dict):
"""Initialise and validate the state"""
self.validate(data)
self._dict = copy.deepcopy(data)