Restock & Price detection - Ability to set up a tag/group that applies to all watches with price + restock limits

This commit is contained in:
dgtlmoon
2024-07-16 17:23:39 +02:00
committed by GitHub
parent 1405e962f0
commit bde27c8a8f
11 changed files with 230 additions and 82 deletions

View File

@@ -59,6 +59,11 @@ class Watch(BaseWatch):
super().__init__(*arg, **kw)
self['restock'] = Restock(kw['default']['restock']) if kw.get('default') and kw['default'].get('restock') else Restock()
self['restock_settings'] = kw['default']['restock_settings'] if kw.get('default',{}).get('restock_settings') else {
'follow_price_changes': True,
'in_stock_processing' : 'in_stock_only'
} #@todo update
def clear_watch(self):
super().clear_watch()
self.update({'restock': Restock()})