I am using openhab2 on a raspberry pi, to interact with my IHC-controller (home automation system).
I am new with writing code.
I am using Chromecast Audio along with my amplifier.
I wrote this rule to turn on my amplifier when Chromecast changes to PLAY, and to turn the amplifier off, when status is PAUSE.
rule “Tænd for forstærker i køkken, når CCK afspiller”
Item CCK changed to PLAY
rule “Sluk for forstærker i køkken, når CCK ikke afspiller”
Item CCK changed to PAUSE
Unfortunately, CC Audio changes to pause during one track stops, and i new one begins…
How can I delay the off-command (pause for more than 2 sec, then sendCommand(OFF)) ?