Remove usage of deprecated hass.local_api in __main__

This commit is contained in:
Paulus Schoutsen 2015-05-15 23:26:22 -07:00
parent e3e64a3a18
commit f3f2240e4a

View File

@ -141,9 +141,9 @@ def main():
def open_browser(event): def open_browser(event):
""" Open the webinterface in a browser. """ """ Open the webinterface in a browser. """
if hass.local_api is not None: if hass.config.api is not None:
import webbrowser import webbrowser
webbrowser.open(hass.local_api.base_url) webbrowser.open(hass.config.api.base_url)
hass.bus.listen_once(EVENT_HOMEASSISTANT_START, open_browser) hass.bus.listen_once(EVENT_HOMEASSISTANT_START, open_browser)