Skip to content

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 3 commits into from
Oct 28, 2016
Merged

switch.rest updates #1030

merged 3 commits into from
Oct 28, 2016

Conversation

aa755
Copy link
Contributor

@aa755 aa755 commented Oct 1, 2016

updates corresponding to home-assistant/core#3329

@@ -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`.
Copy link
Contributor

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

@robbiet480 robbiet480 changed the title updates corresponding to PR#3329 switch.rest updates Oct 2, 2016
@robbiet480 robbiet480 added the Hacktoberfest An PR on this issue (or the PR itself) is eligible towards Hacktoberfest! label Oct 3, 2016
Copy link
Contributor

@Landrash Landrash left a 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.

@Landrash Landrash modified the milestone: 0.32 Oct 23, 2016
@Landrash Landrash added the new-feature This PR adds documentation for a new Home Assistant feature to an existing integration label Oct 23, 2016
@fabaff fabaff merged commit 7935284 into home-assistant:next Oct 28, 2016
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants