mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 23:06:58 +00:00
Update squeezebox.markdown (#37293)
* Update squeezebox.markdown Adds specific examples for entering call_method in the Visual Editor with working parameter syntax, as well as showing the properly formed YAML generated. Squeezebox increment / decrement parameters require a preceding plus or minus, which will be dropped by the Visual Editor if not double-quoted. * Update squeezebox.markdown Correct missing closing pipes in tables per Code Rabbit suggestion.
This commit is contained in:
parent
03b7496cbe
commit
aa4420041a
@ -96,6 +96,50 @@ For example, to play an album from your collection, create an IFTTT applet like
|
||||
|
||||
This can work with title search and basically any thing. The same wouldn't have worked by calling directly Squeezebox server as IFTTT cannot escape the text field.
|
||||
|
||||
When specifying additional parameters in the Visual Editor, each parameter must be preceded by a hyphen and a space to correctly populate the array:
|
||||
|
||||
For example, to create an automation to mute playback, use the command `mixer` and the parameter `muting`:
|
||||
|
||||
| Row | Parameter | Description |
|
||||
| --- | -------- | ----------- |
|
||||
| 1 | - muting | Toggle muting on / off |
|
||||
| 2 | | |
|
||||
|
||||
resulting in the YAML:
|
||||
|
||||
```yaml
|
||||
# Toggle the muting state of the specified player
|
||||
action: squeezebox.call_method
|
||||
metadata: {}
|
||||
data:
|
||||
command: mixer
|
||||
parameters:
|
||||
- muting
|
||||
```
|
||||
|
||||
Where a parameter is an increment or decrement, it is necessary to place the value in double quotes.
|
||||
|
||||
For example, to increase the playback volume, use the command `mixer` and the parameters `volume` and the amount to increment:
|
||||
|
||||
| Row | Parameter | Description |
|
||||
| --- | -------- | ----------- |
|
||||
| 1 | - volume | Parameter to change |
|
||||
| 2 | - "+5" | Increment volume by 5 percent |
|
||||
|
||||
resulting in the YAML:
|
||||
|
||||
```yaml
|
||||
# Increment the playback volume of the specified player by five percent
|
||||
action: squeezebox.call_method
|
||||
metadata: {}
|
||||
data:
|
||||
command: mixer
|
||||
parameters:
|
||||
- volume
|
||||
- "+5"
|
||||
```
|
||||
|
||||
|
||||
### Action `call_query`
|
||||
|
||||
Call a custom Squeezebox JSON-RPC API. The result of the query will be stored in the 'query_result' attribute of the player.
|
||||
|
Loading…
x
Reference in New Issue
Block a user