Hi guys, could use your help with this. (have seen a solution for it some time ago but cannot find it anymore)
With the Kodi integration I get an idle/playing/paused status from the player.
I have an automation that switches on a smart plug when going from * to playing and with some delay switches off when going to idle.
This works except when, within that timeframe, the player goes into idle state briefly, the automation is triggered and switches off the plug.
How can I prevent that the next step in the automation fires within the timeframe of the delay?
- id: '1615072826241'
alias: Kodi-speakers OFF
description: ''
trigger:
- platform: state
entity_id: media_player.mc
to: idle
from: playing
- platform: state
entity_id: media_player.mc
to: idle
from: paused
condition: []
action:
- delay:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
- type: turn_off
device_id: bbb36b9da2b826c63bb7ae63b23f52a3
entity_id: switch.smartplug
domain: switch
mode: single
Thanks A LOT in advance!