mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-10 00:39:22 -06:00
24 lines
492 B
Python
24 lines
492 B
Python
"""Main file for HassIO."""
|
|
import asyncio
|
|
import logging
|
|
|
|
import hassio.bootstrap as bootstrap
|
|
import hassio.core as core
|
|
|
|
_LOGGER = logging.getLogger(__name__)
|
|
|
|
|
|
# pylint: disable=invalid-name
|
|
if __name__ == "__main__":
|
|
bootstrap.initialize_logging()
|
|
|
|
if not bootstrap.check_environment():
|
|
exit(1)
|
|
|
|
loop = asyncio.get_event_loop()
|
|
_LOGGER.info("Start Hassio task")
|
|
loop.create_task(core.run_hassio(loop))
|
|
|
|
loop.run_forever()
|
|
_LOGGER.info("Close Hassio")
|