From 0f7a4b1d6fa7908588945a1f04c448ee9636dbd3 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Sat, 4 Nov 2017 05:10:08 +0100 Subject: [PATCH] Move timer into correct folder (#10324) * Move timer into correct folder * Rename tests/components/test_timer.py to tests/components/timer/test_timer.py * create init for test component * Fix services.yaml loading --- homeassistant/components/{timer.py => timer/__init__.py} | 4 ++-- tests/components/timer/__init__.py | 1 + tests/components/{test_timer.py => timer/test_init.py} | 0 3 files changed, 3 insertions(+), 2 deletions(-) rename homeassistant/components/{timer.py => timer/__init__.py} (98%) create mode 100644 tests/components/timer/__init__.py rename tests/components/{test_timer.py => timer/test_init.py} (100%) diff --git a/homeassistant/components/timer.py b/homeassistant/components/timer/__init__.py similarity index 98% rename from homeassistant/components/timer.py rename to homeassistant/components/timer/__init__.py index 4d21cca40bb..b2f5db88b5f 100644 --- a/homeassistant/components/timer.py +++ b/homeassistant/components/timer/__init__.py @@ -166,8 +166,8 @@ def async_setup(hass, config): yield from asyncio.wait(tasks, loop=hass.loop) descriptions = yield from hass.async_add_job( - load_yaml_config_file, os.path.join( - os.path.dirname(__file__), os.path.join(DOMAIN, 'services.yaml')) + load_yaml_config_file, + os.path.join(os.path.dirname(__file__), 'services.yaml') ) hass.services.async_register( diff --git a/tests/components/timer/__init__.py b/tests/components/timer/__init__.py new file mode 100644 index 00000000000..160fc633701 --- /dev/null +++ b/tests/components/timer/__init__.py @@ -0,0 +1 @@ +"""Test env for timer component.""" diff --git a/tests/components/test_timer.py b/tests/components/timer/test_init.py similarity index 100% rename from tests/components/test_timer.py rename to tests/components/timer/test_init.py