mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
Clarify appropriate return values for an endpoint (#35003)
* Clarify appropriate return values for an endpoint Previously it wasn't as clear as it could be what it was that a server could return for the REST binary sensor to function out of the box. This patch enumerates all the possibilities and makes it explicit it is a singular value. * Update source/_integrations/binary_sensor.rest.markdown Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --------- Co-authored-by: Franck Nijhof <frenck@frenck.nl> Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
00865d5ef6
commit
5e26c8221c
@ -16,8 +16,9 @@ The binary sensor has support for GET and POST requests.
|
||||
|
||||
_Tip:_ If you want to create multiple `sensors` using the same endpoint, use the [RESTful](/integrations/rest) configuration instructions.
|
||||
|
||||
The JSON messages can contain different values like `1`, `"1"`,
|
||||
`TRUE`, `true`, `on`, or `open`. If the value is nested then use a
|
||||
If the endpoint returns one of the values of these pairs: `0`/`1`,
|
||||
`"0"`/`"1"`, `FALSE`/`TRUE`, `false`/`true`, `off`/`on` or `closed`/`open`
|
||||
it can be used as-is. If the return value differs, use a
|
||||
[template](/docs/configuration/templating/#processing-incoming-data).
|
||||
If the endpoint returns XML with the `text/xml`, `application/xml`, or
|
||||
`application/xhtml+xml` content type, it will automatically be converted
|
||||
|
Loading…
x
Reference in New Issue
Block a user