revert to normal run

This commit is contained in:
Denis-Cosmin Nutiu 2024-02-07 21:51:42 +02:00
parent 586bbdc439
commit 0d7caf1418

View file

@ -1,4 +1,3 @@
import asyncio
import logging import logging
import pprint import pprint
import signal import signal
@ -30,7 +29,7 @@ def get_bridge(accessory_driver: AccessoryDriver, settings: Settings):
return bridge return bridge
async def main(): if __name__ == "__main__":
logging.basicConfig(level="INFO") logging.basicConfig(level="INFO")
settings = Settings() settings = Settings()
logging.info("Running with settings:") logging.info("Running with settings:")
@ -45,8 +44,4 @@ async def main():
driver.add_accessory(accessory=get_bridge(driver, settings)) driver.add_accessory(accessory=get_bridge(driver, settings))
signal.signal(signal.SIGTERM, driver.signal_handler) signal.signal(signal.SIGTERM, driver.signal_handler)
signal.signal(signal.SIGINT, driver.signal_handler) signal.signal(signal.SIGINT, driver.signal_handler)
await driver.async_start() driver.start()
if __name__ == "__main__":
asyncio.run(main())