Skip to content

Commit

Permalink
uzsu: fix comparison of new and old dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
onkelandy committed Dec 13, 2024
1 parent b60eb57 commit 5cafb5d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions uzsu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,11 @@ def update_item(self, item, caller=None, source='', dest=None):
else:
self.logger.info(f'Dry run of scheduler calculation for item {item} to get calculated sunset/rise entries. Source: {source}')
self._schedule(item, caller='dry_run')

if self._items[item] != self.itemsApi.return_item(str(item)) and cond:
try:
current_value = self.itemsApi.return_item(str(item)).property.value
except:
current_value = None
if cond and self._items[item] != current_value:
self._update_item(item, 'UZSU Plugin', 'update')

def _update_item(self, item, caller="", comment="", entryindex=None):
Expand Down

0 comments on commit 5cafb5d

Please sign in to comment.