Use the editor below to configure the menu structure displayed in the Bangle app. It is in the JSON format.
The main menu, and any sub-menus, are arrays. They can contain 3 different types of entries (objects) defined by the "type" attribute:
{
"type": "state",
"title": "Menu entry title",
"id": "HA Entity ID"
}
The required Entity ID can be looked up in HA under Settings ->
Devices & Services -> Entities. For example:
{
"type": "state",
"title": "Check for updates",
"id": "update.home_assistant_core_update"
}
{
"type": "service",
"title": "Menu entry title",
"domain": "HA Domain",
"service": "HA Service",
"silent": (true|false),
"data": {
"key": "value"
}
}
The required information to call a HA service can be found in HA under the Developer tools -> Services. Use the "Go to YAML Mode" function to see the actual names and values. The domain and service parts are the 2 parts of the service name which are separated by a dot. If the optional "silent" boolean is set to true (false is default), there will be no message in case of a successful call. Any (optional) data key/value pairs can be added under the "data" field. For example, here's a service call YAML:
service: persistent_notification.create
data:
message: test Notification
title: Test
The resulting menu entry (JSON object) should be:
{
"type": "service",
"title": "Create Notification",
"domain": "persistent_notification",
"service": "create",
"data": {
"message": "test Notification",
"title": "Test"
}
}
If the service requires a target, include the
"entity_id"/"device_id"/etc. (listed under "target:") also as "data"
key/value pairs. For example, if the YAML also includes:
target:
device_id: abcd1234
... add another "data" key/value pair: "device_id": "abcd1234".
If that doesn't work, list the device (or entity) ID in an array:
"device_id": [ "abcd1234" ]
Data fields can also have variable input on the Bangle. In that case, don't add the key/value pair under "data", but create an "input" object with entries per "data" key:
{
"key": {
"options": [],
"value": "",
"label": ""
}
}
If "options" is left empty, the preferred text-input (pick your
favourite app - I like the dragboard) is called to allow entering a
free-form value. Otherwise, list the allowed values in the "options"
array. The "value" is the pre-defined/default value. The "label" is
optional and can be used to override the label for this key (as
displayed on the Bangle). For example:
{
"type": "service",
"title": "Custom Notification",
"domain": "persistent_notification",
"service": "create",
"data": {
"title": "Fixed"
},
"input": {
"message": {
"options": [],
"value": "Pre-filled text"
},
"notification_id": {
"options": [
"123",
"456",
"136"
],
"value": "999",
"label": "ID"
}
}
}
In the above example, the "data" will have 3 key/value pairs when the
service is called: the "title" is always the same, "message" can be
entered via the (free-form) text-input and "notification_id" can be
selected from a list of numbers (however, the prompt will be for "ID"
and not "notification_id"). If the default value is not listed in
"options" (like "999"), it will be added to that list.
{
"type": "menu",
"title": "Menu entry / sub-menu title",
"data": []
}
The "data" needs to be another array of menu entries. For example:
{
"type": "menu",
"title": "Sub-menu",
"data": [
{
"type": "state",
"title": "Check for Supervisor updates",
"id": "update.home_assistant_supervisor_update"
},
{
"type": "service",
"title": "Restart HA",
"domain": "homeassistant",
"service": "restart",
"data": {}
}
]
}
Sub-menus can contain other sub-menus, so you can have multiple levels
of nested menus.