1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00
Files
core/start.py
Paulus Schoutsen 8ac8700154 Added API
2013-09-28 11:09:36 -07:00

22 lines
632 B
Python

from ConfigParser import SafeConfigParser
from homeassistant import HomeAssistant
from homeassistant.actors import HueLightControl
from homeassistant.observers import TomatoDeviceScanner
config = SafeConfigParser()
config.read("home-assistant.conf")
tomato = TomatoDeviceScanner(config.get('tomato','host'), config.get('tomato','username'),
config.get('tomato','password'), config.get('tomato','http_id'))
ha = HomeAssistant(config.get("common","latitude"), config.get("common","longitude"))
ha.setup_light_trigger(tomato, HueLightControl())
ha.setup_http_interface(config.get("common","api_password"))
ha.start()