mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Remove usage of deprecated hass.local_api in __main__
This commit is contained in:
parent
e3e64a3a18
commit
f3f2240e4a
@ -141,9 +141,9 @@ def main():
|
||||
|
||||
def open_browser(event):
|
||||
""" Open the webinterface in a browser. """
|
||||
if hass.local_api is not None:
|
||||
if hass.config.api is not None:
|
||||
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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user