recipe links
This commit is contained in:
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from home_assistant.sync import run_due_syncs
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Run due Home Assistant grocery syncs.'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
result = run_due_syncs()
|
||||
self.stdout.write(
|
||||
f"Home Assistant syncs: {result['succeeded']} succeeded, "
|
||||
f"{result['failed']} failed, {result['attempted']} attempted."
|
||||
)
|
||||
Reference in New Issue
Block a user