From 0d7caf141882614d23c62871934c1c3f362b9733 Mon Sep 17 00:00:00 2001 From: dnutiu Date: Wed, 7 Feb 2024 21:51:42 +0200 Subject: [PATCH] revert to normal run --- app/main.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/main.py b/app/main.py index b425352..8baef8f 100644 --- a/app/main.py +++ b/app/main.py @@ -1,4 +1,3 @@ -import asyncio import logging import pprint import signal @@ -30,7 +29,7 @@ def get_bridge(accessory_driver: AccessoryDriver, settings: Settings): return bridge -async def main(): +if __name__ == "__main__": logging.basicConfig(level="INFO") settings = Settings() logging.info("Running with settings:") @@ -45,8 +44,4 @@ async def main(): driver.add_accessory(accessory=get_bridge(driver, settings)) signal.signal(signal.SIGTERM, driver.signal_handler) signal.signal(signal.SIGINT, driver.signal_handler) - await driver.async_start() - - -if __name__ == "__main__": - asyncio.run(main()) + driver.start()