mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-03 21:37:49 -05:00
convert example & homeassistant specific configs to a generic with all optional fields
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
from cookbook.models import ShoppingListEntry, Space
|
||||
from cookbook.models import ShoppingListEntry, Space, ConnectorConfig
|
||||
|
||||
|
||||
class Connector(ABC):
|
||||
@abstractmethod
|
||||
def __init__(self, config: ConnectorConfig):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def on_shopping_list_entry_created(self, space: Space, instance: ShoppingListEntry) -> None:
|
||||
pass
|
||||
@@ -20,5 +24,4 @@ class Connector(ABC):
|
||||
async def close(self) -> None:
|
||||
pass
|
||||
|
||||
# TODO: Maybe add an 'IsEnabled(self) -> Bool' to here
|
||||
# TODO: Add Recipes & possibly Meal Place listeners/hooks (And maybe more?)
|
||||
|
||||
Reference in New Issue
Block a user