-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
switch.rest updates #1030
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
Merged
Merged
switch.rest updates #1030
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merged
8 tasks
Landrash
reviewed
Oct 1, 2016
@@ -32,7 +32,7 @@ Configuration variables: | |||
- **name** (*Optional*): Name of the REST switch. | |||
- **body_on** (*Optional*): The body of the POST request that commands the switch to become enabled. Default is "ON". This value can be a [template](/topics/templating/), which is useful if the POST request needs to depend on the state of the system. For example, to enable remote-temperature-sensor tracking on a radio thermostat, one has to send the current value of the remote temperature sensor. On can achieve this using the template `'{"rem_temp":{{states.sensor.bedroom_temp.state}}}'`. | |||
- **body_off** (*Optional*): The body of the POST request that commands the switch to become disabled. Default is "OFF". This value can also be a template. | |||
- **is_on_template** (*Optional*): A [template](/topics/templating/) that determines the state of the switch from the value returned by a GET request on the resource url. This template should compute to a boolean (True or False). Default is equivalent to `{{ value.json == body_on }}`. | |||
- **is_on_template** (*Optional*): A [template](/topics/templating/) that determines the state of the switch from the value returned by the GET request on the resource url. This template should compute to a boolean (True or False). Default is equivalent to `{{ value.json == body_on }}`. This means that by default, the state of the switch is on iff the response to the GET request matches `body_on`. |
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.
Spelling: iff with 2 f
Landrash
approved these changes
Oct 23, 2016
Landrash
approved these changes
Oct 23, 2016
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.
Looks good and hopefully well have this in 0.32.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Hacktoberfest
An PR on this issue (or the PR itself) is eligible towards Hacktoberfest!
new-feature
This PR adds documentation for a new Home Assistant feature to an existing integration
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
updates corresponding to home-assistant/core#3329