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:
@@ -6,6 +6,8 @@ import logging
|
|||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.components import websocket_api as ha_websocket
|
from homeassistant.components import websocket_api as ha_websocket
|
||||||
|
from .websocket_api import websocket_create_list
|
||||||
|
|
||||||
|
|
||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
from .manager import ShoppingListManager
|
from .manager import ShoppingListManager
|
||||||
@@ -34,6 +36,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
hass.data[DOMAIN]["manager"] = manager
|
hass.data[DOMAIN]["manager"] = manager
|
||||||
|
|
||||||
# Register WebSocket commands using Home Assistant's websocket_api
|
# Register WebSocket commands using Home Assistant's websocket_api
|
||||||
|
ha_websocket.async_register_command(hass, websocket_create_list)
|
||||||
ha_websocket.async_register_command(hass, websocket_add_product)
|
ha_websocket.async_register_command(hass, websocket_add_product)
|
||||||
ha_websocket.async_register_command(hass, websocket_set_qty)
|
ha_websocket.async_register_command(hass, websocket_set_qty)
|
||||||
ha_websocket.async_register_command(hass, websocket_get_products)
|
ha_websocket.async_register_command(hass, websocket_get_products)
|
||||||
|
|||||||
Reference in New Issue
Block a user