Creates the FSM and the cache. It can be called several times to reset
        stuff (like for unit tests...).

        It also runs all the health checks in order to see if everything is fit
        for running.

async def init(self):
        """
        Creates the FSM and the cache. It can be called several times to reset
        stuff (like for unit tests...).

        It also runs all the health checks in order to see if everything is fit
        for running.
        """
        self.fsm = FSM()

        checks = []

        # noinspection PyTypeChecker
        async for check in self.run_checks():
            checks.append(check)
            logger.error('HEALTH CHECK FAIL #%s: %s', check.code, check.reason)

        if checks:
            exit(1)

        await self.fsm.async_init()

        self.platforms = {}