From aa4420041a1bb6065a64d4dcc83da2cd36b69316 Mon Sep 17 00:00:00 2001 From: Gene Berkowitz <111010697+TheCodeJanitor-dotcom@users.noreply.github.com> Date: Thu, 6 Feb 2025 15:55:02 -0500 Subject: [PATCH] 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. --- source/_integrations/squeezebox.markdown | 44 ++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/source/_integrations/squeezebox.markdown b/source/_integrations/squeezebox.markdown index 7be7a9d6ed8..ec0bd3cc288 100644 --- a/source/_integrations/squeezebox.markdown +++ b/source/_integrations/squeezebox.markdown @@ -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.