Skip to content

Commit 816f2e6

Browse files
authored
Update Actions.md
Documentation for the `service` field after a recently uncovered issue with its value. See #205. Signed-off-by: Philip Abbey <[email protected]>
1 parent f171f91 commit 816f2e6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

examples/Actions.md

+5
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,8 @@ Note that for notify events, you _must_ not supply an `entity_id` or the API cal
7070
}
7171
}
7272
```
73+
74+
> [!IMPORTANT]
75+
> Be careful with the value of the `service` field.
76+
77+
Note that the `service` field will need to be a locally custom `script.<something>` as soon as any `data` fields are populated and not something more generic like `script.turn_on`. If the `service` field is wrong, the application will fail with a [`Communications.INVALID_HTTP_BODY_IN_NETWORK_RESPONSE`](https://developer.garmin.com/connect-iq/api-docs/Toybox/Communications.html) error in the response from your Home Assistant and show the error message as _"No JSON returned from HTTP request"_ on your device. In the [web-based editor](https://house-of-abbey.github.io/GarminHomeAssistant/web/) you can use the standard developer tools to observe an `HTTP 400` error which the application does not see. Here we are limited by the [Garmin Connect IQ](https://developer.garmin.com/connect-iq/overview/) software development kit (SDK). We do not have enough information at the point of execution in the application to determine the cause of the error. Nor is there an immediately obvious way of identifying this issue using the JSON schema checks.

0 commit comments

Comments
 (0)