mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Browser: If no url is given go to Google.com
This commit is contained in:
parent
87817de805
commit
b387f9d9d7
@ -17,6 +17,9 @@ def setup(bus):
|
|||||||
import webbrowser
|
import webbrowser
|
||||||
|
|
||||||
bus.register_service(DOMAIN, SERVICE_BROWSE_URL,
|
bus.register_service(DOMAIN, SERVICE_BROWSE_URL,
|
||||||
lambda service: webbrowser.open(service.data['url']))
|
lambda service:
|
||||||
|
webbrowser.open(
|
||||||
|
service.data.get('url',
|
||||||
|
'https://www.google.com')))
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user