I have the lights dimming automation for kodi working great but have incorporated a wemo switch that controls my bar lights; I want to turn those off when media is playing (this is working) but not turn them back on unless media stops (I want them to stay off when media is paused). I have tried putting the commands to: ‘stopped’ and to: ‘media_stop’ but they do not work. Is there a state for the media player’s stop function? All I can seem to find reference to is configs with paused/stopped and the config has from: ‘playing’.
With state changes, you can use a “from” as well as a “to”. You can see an example here:
I watch for when my Squeezebox’s state switches to playing from idle or off.
Yes! changing it to “to: ‘idle’” did it. Thanks for putting me on the right path!
A good debugging tip - use the states dev tool and you can see how the state of your devices change when they’re turned on/off or paused. That’ll give you the correct states to target.
Ran into another problem. Now when I turn my theatre off, the kodi stopped scene keeps getting triggered by the idle state of kodi. I thought a scene would only run once and not be continuously triggered by the state?
So my beer signs turn off and then back on again…
The automation should only trigger when the state changes. If you’re just using “to:idle”, you might fix that by using “from:playing” or whatever the playing state is. That’ll filter out if the state is polling and remains “idle”.
The problem with “from:playing” is that it triggers the action with pauses as well. I will keep tinkering!
I’m suggesting that you can use both at the same time…
from: playing
to: idle
Ah, nice, I’ll try that!
After re - reading the thread, I see that you had been suggesting that the whole time. It just clicked with me now.