summaryrefslogtreecommitdiffstats
path: root/src/main.py
blob: d705374b9e77d4ee3603a134ca8d8cf135053eaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from discover import discover
import os
from logger import get_logger
import asyncio

logger = get_logger("Main")

async def main(debug_flag=None):
    check_debug = debug_flag if debug_flag is not None else os.getenv("DEBUG", "FALSE").upper() == "TRUE"
    if check_debug:
        logger.info("Debug mode is enabled")
    devices = await discover(debug=check_debug)
    print(devices)

if __name__ == "__main__":
    asyncio.run(main())
git.ajschof.me — hosted by ajschofield — powered by cgit