fix: dont log private and protected attribute changes

This commit is contained in:
Mose Müller
2023-12-11 12:52:58 +01:00
parent 0694a3d1ee
commit 8ac2c39908
2 changed files with 23 additions and 1 deletions

View File

@ -30,7 +30,9 @@ class DataServiceObserver(PropertyObserver):
)
cached_value = cached_value_dict.get("value")
if cached_value != dump(value)["value"]:
if cached_value != dump(value)["value"] and all(
part[0] != "_" for part in full_access_path.split(".")
):
logger.debug("'%s' changed to '%s'", full_access_path, value)
self._update_cache_value(full_access_path, value, cached_value_dict)