Automation of GPMDP

I’m trying to get an automation set up to automatically pause GPMDP when my device tracker state changes from home to not_home. I’ve got other automations that trigger properly on this event, but I’m having issues with conditions in this one. For some reason, it’s not picking up the right state for the entity, so my condition isn’t being respected. This means that the automation effectively toggles the play/pause state, rather than calling pause only if media is playing.

I’ve used the automation editor in HassIO, which generated this piece of code in my automations.yaml file. I can’t figure out what’s wrong here. Looks like everything is set up properly, but the darn thing just isn’t respecting the condition. Sadly, GMPDP doesn’t differentiate between “play” and “pause” commands, and I can’t turn it off with “turn_off” either.

- action:
  - condition: state
    entity_id: media_player.gpm_desktop_player
    state: 'playing'
  - data:
      entity_id: media_player.gpm_desktop_player
    service: media_player.media_pause
  alias: Stop music when I leave
  condition: []
  id: '1508012923695'
  trigger:
  - entity_id: device_tracker.oneplus_five
    from: home
    platform: state
    to: not_home