Pause active tv when on or getting call

I’m not an idiot, but i am more of a hardware vs software guy. I’ve been trying to get my phone state from my cell phones in the house to pause certain tv’s and such.

Hardware:
2 Samsung S22’s
1 iPhone
3 Roku’s
1 Firestick

Software:
HA OS on a RPi - hacs
HA On all 3 phones

I saw this somewhere else:

- alias: Phone Calls
  trigger:
#making a call:  idle to offhook
    - platform: state
      entity_id: sensor.phone_phone_state
      from: idle
      to: offhook

#answering a call: ringing to offhook
    - platform: state
      entity_id: sensor.phone_phone_state
      from: ringing
      to: offhook

#hanging up a call: offhook to idle
    - platform: state
      entity_id: sensor.phone_phone_state
      from: offhook
      to: idle

  condition:
    - condition: state
      entity_id: sensor.where_are_you
      state: 'Home'

I cant sem to find any entities anywhere that match these in any way. I can see battery states but not phone_state on the samsung’s. I can also see the iPhones: SIM 1 & 2, and activity.

can someone help an old idgit out and either guide me to resources that might be helpful (i’ve searched any way i can seem to search) or just lemme know how to do it?

You likely need to use Tasker to do this. I’m not sure Andriod can do this out of the box without help from an external software.

use the phone state sensor https://companion.home-assistant.io/docs/core/sensors#phone-state-sensor

Settings > companion app > manage sensors > enable phone state sensor

1 Like

OK so i figured it out while you guys were writing.

First i realized i had my entities set to only active or whatever, so i turned the filter off, then i realized it was disabled, so i went to fix that. Viola its done.

Steps for anyone that comes in the future:

Go into Apps > Home Assistant and turn on permissions
Then create an automation. I’ll attach a screenshot and the yaml so you can see how i have mine setup.

Thanks Yall!

alias: Pause TV - FriGiN Firestick
description: ""
triggers:
  - trigger: state
    entity_id:
      - sensor.frigin_cell_phone_state
    from: idle
    to: ringing
  - trigger: state
    entity_id:
      - sensor.frigin_cell_phone_state
    from: ringing
    to: offhook
conditions:
  - condition: device
    device_id: c597775248ef7c545748506bfb52315b
    domain: device_tracker
    entity_id: ca1e3fdc489f8cc073aa6151f0bf8999
    type: is_home
  - condition: device
    device_id: 4e877c75ca44e1ddf045626f5f82db2c
    domain: media_player
    entity_id: e7b781f7ebbdcb1dd976c56225ff4195
    type: is_playing
actions:
  - action: media_player.media_pause
    metadata: {}
    data: {}
    target:
      area_id: man_cave
mode: single

OBVIOUSLY replace your phone sensor and tv name etc but this is mine and it works.

1 Like