mirror of
https://github.com/thekiwismarthome/shopping-list-manager.git
synced 2026-05-01 11:46:30 +00:00
Update __init__.py
This commit is contained in:
@@ -39,9 +39,15 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
# Initialize storage with country
|
# Initialize storage with country
|
||||||
storage = ShoppingListStorage(hass, component_path, country)
|
storage = ShoppingListStorage(hass, component_path, country)
|
||||||
await storage.async_load()
|
await storage.async_load()
|
||||||
|
|
||||||
|
# Initialize search engine after products are loaded
|
||||||
|
self._search_engine = ProductSearch(self._products)
|
||||||
|
_LOGGER.debug("Initialized product search engine")
|
||||||
|
|
||||||
# Initialize image handler
|
# Initialize image handler
|
||||||
image_handler = ImageHandler(hass, config_path)
|
image_handler = ImageHandler(hass, config_path)
|
||||||
|
|
||||||
|
self._search_engine: Optional[ProductSearch] = None
|
||||||
|
|
||||||
# Store instances in hass.data
|
# Store instances in hass.data
|
||||||
hass.data.setdefault(DOMAIN, {})
|
hass.data.setdefault(DOMAIN, {})
|
||||||
|
|||||||
Reference in New Issue
Block a user