# Pause Playing Media During Calls

{% hint style="success" %}
URL to use for import in Home Assistant\
<https://gist.github.com/ludeeus/58ab08b94424c12a8f911e932eb2f46a>
{% endhint %}

This Blueprint has some requirements before it's useful:

* [x] Home Assistant Companion App for Android is set up (currently no iOS support)
* [x] Reporting of phone state is activated in the Android app
* [x] At least 1 media player entity

![Example on how an automation can be made from the blueprint in the UI](https://1795890449-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MA2sCwb2Q6xcJroX5E-%2F-MOYslDQTrY64zURbhDJ%2F-MOYvCSauv9CXGckJPuU%2Fimage.png?alt=media\&token=2898f29b-59b5-44c3-8d35-fa69bcef40b8)

{% hint style="warning" %}
Only entites can be used, if you select area or device you need to expand it untill you are left with only entites
{% endhint %}

{% code title="configuration.yaml" %}

```yaml
# Example on how an automation can be made from the blueprint with YAML
automation pause_music_during_calls:
  alias: Pause Spotify when my phone rings
  use_blueprint:
    path: ludeeus/pause_media_during_calls.yaml
    input:
      phone_state_sensor: sensor.sm_g973f_phone_state
      media_player:
        entity_id: media_player.spotify_joakim_sorensen
```

{% endcode %}
