ADB Bridge Automation

So I have an automation that sends a HOME command to my Nvdia Shield and then another one to put it to sleep via ADB Bridge when my wife turns our TV off. The automation yml is below but recently the automation randomly seems to be sending the HOME and SLEEP commands to my Shield so it turns off mid viewing which is getting complaints! I’ve narrowed it down to the automation as when I turn this off there is no issue and call services normally seems to be ok. I’ve recreated the automation but still get the same issue, At a bit of a loss here and would appreciate some help as I really like this automation and it stops my shield being left on Youtube all day!

- id: '1569612568170'
  alias: Turn off Shield when TV switched off
  trigger:
  - entity_id: media_player.samsung_tv_remote
    from: 'on'
    platform: state
    to: 'off'
  condition: []
  action:
  - data:
      command: HOME
      entity_id: media_player.shield
    service: androidtv.adb_command
  - data:
      command: SLEEP
      entity_id: media_player.shield
    service: androidtv.adb_command