From c72dbf0a83c4f3ba5a901c3778adbb50a04c3900 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 7 Oct 2013 18:31:31 -0700 Subject: [PATCH] Cleaned up the imports of start.py --- start.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/start.py b/start.py index 1dc612e196b..b014f2a644b 100644 --- a/start.py +++ b/start.py @@ -2,8 +2,8 @@ from ConfigParser import SafeConfigParser from homeassistant import StateMachine, EventBus, start_home_assistant -from homeassistant.observers import TomatoDeviceScanner, DeviceTracker, track_sun -from homeassistant.actors import HueLightControl, LightTrigger, setup_file_downloader +from homeassistant import observers +from homeassistant import actors from homeassistant.httpinterface import HTTPInterface from lib.pychromecast import play_youtube_video @@ -17,22 +17,22 @@ eventbus = EventBus() statemachine = StateMachine(eventbus) # Init observers -tomato = TomatoDeviceScanner(config.get('tomato','host'), config.get('tomato','username'), - config.get('tomato','password'), config.get('tomato','http_id')) +tomato = observers.TomatoDeviceScanner(config.get('tomato','host'), config.get('tomato','username'), + config.get('tomato','password'), config.get('tomato','http_id')) -devicetracker = DeviceTracker(eventbus, statemachine, tomato) +devicetracker = observers.DeviceTracker(eventbus, statemachine, tomato) -track_sun(eventbus, statemachine, config.get("common","latitude"), config.get("common","longitude")) +observers.track_sun(eventbus, statemachine, config.get("common","latitude"), config.get("common","longitude")) # Init actors -LightTrigger(eventbus, statemachine, devicetracker, HueLightControl()) +actors.LightTrigger(eventbus, statemachine, devicetracker, actors.HueLightControl()) # If a chromecast is specified, add some chromecast specific event triggers if config.has_option("chromecast", "host"): eventbus.listen("start_fireplace", lambda event: play_youtube_video(config.get("chromecast","host"), "eyU3bRy2x44")) eventbus.listen("start_epic_sax", lambda event: play_youtube_video(config.get("chromecast","host"), "kxopViU98Xo")) -setup_file_downloader(eventbus, "downloads") +actors.setup_file_downloader(eventbus, "downloads") # Init HTTP interface HTTPInterface(eventbus, statemachine, config.get("common","api_password"))