Hello there. Another problem that keeps me up at nights.
I created a rule which turns my Music to Pause whenever the Phone rings (used hardware is volumio and a Fritzphone - both included with the appropriate bindings).
Here is my code:
rule "Turn off Volumio when Phone is ringing" when Item fboxRinging changed to ON or Item fboxRinging_Out changed to ON then sendCommand(volumio2_player_volumio_player, "PAUSE") end rule "play after hanging up phone" when Item fboxRinging_Out changed to OFF or Item fboxRinging changed to OFF or then sendCommand(volumio2_player_volumio_player, "PLAY") end
Here’s the thing: I only want openhab to sendCommand “PLAY” after Phonecall ended if the audio was in state PLAY before the phone rang. How do I achieve that? Thank you guys.