HomeAssistant
| Schemes | hassio://, hassios:// |
| Cargo feature | service-homeassistant |
| Service | https://www.home-assistant.io/ |
| Body formats | text (first is the default) |
| Attachments | no |
| Title length | 250 characters |
| Body length | 32,768 characters |
| Body lines | unlimited |
| Request throttle | none |
| Vendor URLs accepted | no |
URL formats
{schema}://{host}/{accesstoken}
{schema}://{host}/{accesstoken}/{targets}
{schema}://{host}:{port}/{accesstoken}
{schema}://{host}:{port}/{accesstoken}/{targets}
{schema}://{user}@{host}/{accesstoken}
{schema}://{user}@{host}/{accesstoken}/{targets}
{schema}://{user}@{host}:{port}/{accesstoken}
{schema}://{user}@{host}:{port}/{accesstoken}/{targets}
{schema}://{user}:{password}@{host}/{accesstoken}
{schema}://{user}:{password}@{host}/{accesstoken}/{targets}
{schema}://{user}:{password}@{host}:{port}/{accesstoken}
{schema}://{user}:{password}@{host}:{port}/{accesstoken}/{targets}
{schema} is one of hassio://, hassios://.
URL tokens
| Token | Meaning | Type | Required | Default | Notes |
|---|---|---|---|---|---|
{accesstoken} | Long-Lived Access Token | string | yes | secret | |
{host} | Hostname | string | yes | ||
{password} | Password | string | no | secret | |
{port} | Port | int, 1 to 65535 | no | ||
{target_device} | Target Device | string | no | ||
{targets} | Targets | list | no | any of target_device; separated by / | |
{user} | Username | string | no |
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
batch | Batch Mode | bool | no | |
nid | Notification ID | string | must match ^[a-z0-9_-]+$ | |
prefix | Path Prefix | string | ||
to | Targets | list | sets {targets} | |
token | Long-Lived Access Token | string | sets {accesstoken} |
The common URL parameters (format, overflow, verify, redirect, cto, rto, retry, wait, store, tag, tz, user, password, port, optional, emojis) apply as well.
Examples
Accepted URLs (tokens are fake):
hassio://localhost/long.lived.token
hassio://user@localhost:8123/long.lived.token
hassio://user:pass@localhost/long.lived.token/
hassio://localhost/prefix/path/long.lived.token
hassios://localhost:8443/path/long.lived.token/
hassio://localhost/0123abcd.0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef/light.turn_on
hassios://localhost/long.lived.token?nid=abcd
hassio://localhost/long.lived.token/notify.mobile:dev1,dev2,dev3?batch=yes
Rejected URLs:
hassio://
hassio://user@localhost
hassios://localhost/long.lived.token?nid=!%
Send one from the command line:
mercurio -t 'Backup' -b 'Finished in 42s' 'hassio://localhost/long.lived.token'
Notes
Home Assistant (hassio://, hassios://): notifications through the Home Assistant REST API.
Without targets a persistent notification is created; otherwise each [domain.]service[:target,...] entry calls /api/services/{domain}/{service}.