|
@@ -2423,8 +2423,6 @@ async def lifespan(app: FastAPI):
|
|
|
|
|
|
|
|
# Restore MQTT smart plug subscriptions
|
|
# Restore MQTT smart plug subscriptions
|
|
|
if mqtt_settings.get("mqtt_enabled"):
|
|
if mqtt_settings.get("mqtt_enabled"):
|
|
|
- from sqlalchemy import select
|
|
|
|
|
-
|
|
|
|
|
from backend.app.models.smart_plug import SmartPlug
|
|
from backend.app.models.smart_plug import SmartPlug
|
|
|
|
|
|
|
|
result = await db.execute(select(SmartPlug).where(SmartPlug.plug_type == "mqtt"))
|
|
result = await db.execute(select(SmartPlug).where(SmartPlug.plug_type == "mqtt"))
|