diff --git a/setup.cfg b/setup.cfg
index 2abd445bb855f4fa7755b3cbb23b95d04daa3650..7813cc5c0472ea94de9791ce5b2439becccce2f1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -15,20 +15,6 @@ classifier =
     Programming Language :: Python :: 3.6
     Topic :: Home Automation
 
-[options]
-packages = find:
-include_package_data = true
-zip_safe = false
-
-[options.entry_points]
-console_scripts =
-    hass = homeassistant.__main__:main
-
-[options.packages.find]
-exclude =
-    tests
-    tests.*
-
 [tool:pytest]
 testpaths = tests
 norecursedirs = .git testing_config
diff --git a/setup.py b/setup.py
index 3833f90f2d10551b5136539b15305753dccbbfb3..928d894c9d1a9f6bbac2596e4435495c005b26ac 100755
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python3
 """Home Assistant setup script."""
 from datetime import datetime as dt
-from setuptools import setup
+from setuptools import setup, find_packages
 
 import homeassistant.const as hass_const
 
@@ -29,6 +29,8 @@ PROJECT_URLS = {
     'Forum': 'https://community.home-assistant.io/',
 }
 
+PACKAGES = find_packages(exclude=['tests', 'tests.*'])
+
 REQUIRES = [
     'aiohttp==3.3.2',
     'astral==1.6.1',
@@ -53,7 +55,15 @@ setup(
     project_urls=PROJECT_URLS,
     author=PROJECT_AUTHOR,
     author_email=PROJECT_EMAIL,
+    packages=PACKAGES,
+    include_package_data=True,
+    zip_safe=False,
     install_requires=REQUIRES,
     python_requires='>={}'.format(MIN_PY_VERSION),
     test_suite='tests',
+    entry_points={
+        'console_scripts': [
+            'hass = homeassistant.__main__:main'
+        ]
+    },
 )