-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delineate platform support of various deeplink types #1159
base: master
Are you sure you want to change the base?
Changes from 6 commits
2043176
877b539
aa31fa9
fb9f2e9
77cdc80
9816aa4
bbff8ca
2ec9eac
58a5dba
e5a40c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -5,11 +5,51 @@ id: 'url-handler' | |||||
|
||||||
Home Assistant supports opening from other apps via URL. | ||||||
|
||||||
Query parameters are passed as a dictionary in the call. | ||||||
## Platform Compatibility | ||||||
|
||||||
:::info | ||||||
If multiple servers are connected to an app, you will be prompted to select a server when handling a `navigate` link. `call_service` and `fire_event` links will be handled using the first server in the list. | ||||||
::: | ||||||
Platform support of different types of deeplinks will vary, consult the table below to see which deeplink types are available for your platform. | ||||||
|
||||||
<table className="core-table"> | ||||||
<thead> | ||||||
<tr> | ||||||
<th><strong>Deep Link Type</strong></th> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consistency with your previous paragraph and use sentence case
Suggested change
|
||||||
<th><img alt="Android" src="/assets/android.svg" /> Full</th> | ||||||
<th><img alt="Android" src="/assets/android.svg" /> Minimal</th> | ||||||
<th><img alt="iOS" src="/assets/iOS.svg" /></th> | ||||||
<th><img alt="macOS" src="/assets/macOS.svg" /></th> | ||||||
</tr> | ||||||
</thead> | ||||||
<tbody> | ||||||
<tr> | ||||||
<td>Navigate</td> | ||||||
<td>✅</td> | ||||||
<td>✅</td> | ||||||
<td>✅</td> | ||||||
<td>✅</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>Call Service</td> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use sentence case
Suggested change
|
||||||
<td></td> | ||||||
<td></td> | ||||||
<td>✅</td> | ||||||
<td>✅</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>Fire Event</td> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use sentence case
Suggested change
|
||||||
<td></td> | ||||||
<td></td> | ||||||
<td>✅</td> | ||||||
<td>✅</td> | ||||||
</tr> | ||||||
<tr> | ||||||
<td>Send Location</td> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use sentence case and match heading
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you have a preference of "Send one shot location" over "Send location"? I prefer the latter, I think because "one shot" is a bit redundant and maybe a little metaphorical, but happy to adopt whichever you prefer. |
||||||
<td></td> | ||||||
<td></td> | ||||||
<td>✅</td> | ||||||
<td>✅</td> | ||||||
</tr> | ||||||
</tbody> | ||||||
</table> | ||||||
|
||||||
## Navigate | ||||||
This allows you to update the frontend page location via a deeplink. To build a deeplink, follow these steps: | ||||||
|
@@ -18,22 +58,32 @@ This allows you to update the frontend page location via a deeplink. To build a | |||||
2. Copy the path portion of the URL, in this example that would be `/dashboard-mobile/my-subview` | ||||||
3. Craft your URL by starting with `homeassistant://navigate` and adding the path, e.g. `homeassistant://navigate/dashboard-mobile/my-subview` | ||||||
|
||||||
### Specify server to navigate to | ||||||
![iOS](/assets/iOS.svg) <span class='beta'>BETA</span><br /> | ||||||
jpelgrom marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
:::info | ||||||
![iOS](/assets/iOS.svg) **Specifying which server to navigate to is currently only supported in iOS**<br /> | ||||||
By default the App will ask which server you want to navigate to in case you have multiple servers. | ||||||
To define which server you want to navigate to, use the query param `?server=` like the example below:<br /><br /> | ||||||
`homeassistant://navigate/webcams?server=My%20home` when your server name is `My Home`, or use `?server=default` if you want to navigate to the first server available. | ||||||
::: | ||||||
|
||||||
## Call service | ||||||
![iOS](/assets/iOS.svg)<br /> | ||||||
Example: `homeassistant://call_service/device_tracker.see?entity_id=device_tracker.entity` | ||||||
|
||||||
Query parameters are passed as a dictionary in the call. | ||||||
|
||||||
:::info | ||||||
If multiple servers are connected to an app, `call_service` links will be handled using the first server in the list. | ||||||
::: | ||||||
|
||||||
## Fire event | ||||||
![iOS](/assets/iOS.svg)<br /> | ||||||
You can create an [event trigger](https://www.home-assistant.io/docs/automation/trigger/#event-trigger) and fire the event. | ||||||
|
||||||
Example: `homeassistant://fire_event/custom_event?entity_id=MY_CUSTOM_EVENT` | ||||||
|
||||||
Query parameters are passed as a dictionary in the call. | ||||||
|
||||||
:::info | ||||||
If multiple servers are connected to an app, `fire_event` links will be handled using the first server in the list. | ||||||
::: | ||||||
|
||||||
## Send one shot location | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm curious what the use case for this is. Is it for if you don't share your location by default but want to once to trigger automations etc? Or to force a precise GPS location update? Maybe both are valid usages? |
||||||
![iOS](/assets/iOS.svg)<br /> | ||||||
Example: `homeassistant://send_location/` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use sentence case - the current page may not always match the standards but let's try to keep them in mind for new documentation.