Media player volume changed

The Media player volume changed trigger fires when a media player’s volume changes and the new value matches the threshold rule you set. Use it when you want to react to a new volume level, not just to playback starting or stopping.

Use Media player volume changed to adjust lights when volume gets high, send a notification when volume drops too low, or react to any change for logging and other routines.

Labs

Requires the Purpose-specific triggers and conditions Labs preview feature. Enable it at Settings > System > Labs.

Using this trigger from the user interface

If you prefer building automations visually, Home Assistant walks you through this trigger step by step. You pick what to watch, tweak a few options, and save. No YAML knowledge required.

To use Media player volume changed in an automation:

  1. Go to Settings > Automations & scenes.
  2. Open an existing automation, or select Create automation > Create new automation.
  3. In the When section, select Add trigger.
  4. Select what you want to monitor. Under By target (see Targets), pick the media player you want to watch. You can also select an area, a floor, a device, or a label.
  5. From the triggers shown for that target, select Media player volume changed.
  6. Under Threshold, set what kind of volume change should fire the trigger:
    • Select Any change to fire on any volume change.
    • Select Above or Below to fire when the new volume is above or below a threshold.
    • Select In range or Outside range to fire when the new volume lands inside or outside a range.
    • For each option, you can enter a fixed percentage from 0 to 100, or use an input_number, number, or sensor entity with % as the unit.
  7. Select Save.

Options in the UI

Threshold

Controls which volume changes fire the trigger:

  • Any change: fires on any volume change.
  • Above or Below (exclusive): fires only when the new volume is strictly above or below the threshold.
  • In range (exclusive): fires only when the new volume is strictly between the lower and upper bounds.
  • Outside range (inclusive): fires when the new volume is at or beyond either bound.

Use a fixed percentage from 0 to 100, or use an input_number, number, or sensor entity with % as the unit.

Using this trigger in YAML

If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.

In YAML, this trigger is referred to as media_player.volume_changed. A basic example looks like this:

TriggerA trigger is a set of values or conditions of a platform that are defined to cause an automation to run. [Learn more]
trigger: media_player.volume_changed
target:
  entity_id: media_player.living_room_receiver
options:
  threshold:
    type: above
    value:
      number: 60

This fires when the receiver volume changes to a value above 60%.

To use a helperA helper is a virtual entity you create inside Home Assistant. It is not backed by a physical device. Helpers store values, track state, or do calculations that your automations and dashboards need. [Learn more] you created separately as a dynamic threshold:

TriggerA trigger is a set of values or conditions of a platform that are defined to cause an automation to run. [Learn more]
trigger: media_player.volume_changed
target:
  entity_id: media_player.living_room_receiver
options:
  threshold:
    type: above
    value:
      entity: input_number.media_volume_limit

Options in YAML

threshold map Required

A mapping that defines which volume changes fire the trigger:

  • type: any: fires on any volume change.
  • type: above (exclusive): fires when the new volume is strictly above value.
  • type: below (exclusive): fires when the new volume is strictly below value.
  • type: between (exclusive): fires when the new volume is strictly between value_min and value_max.
  • type: outside (inclusive): fires when the new volume is at or beyond value_min or value_max.

For a fixed threshold, use number with a percentage from 0 to 100. For a dynamic threshold, use entity with an input_number, number, or sensor entity that uses % as the unit.

Targets of the trigger

This trigger requires a target. The target is the object that Home Assistant will watch. You can select a single entityAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more], a device, an area, a floor, or a label as a target, and Home Assistant will watch every matching media_player entity behind that target.

  • Entity: one specific media_player entity, such as media_player.living_room.
  • Device: every media_player entity that belongs to a device.
  • Area: every media_player entity in a room or area.
  • Floor: every media_player entity on a floor.
  • Label: every media_player entity that shares a label.

You can also select different target types in one trigger. For example, you can add a specific entity and an area as targets in the same trigger to monitor both of them at once.

Good to know

  • This trigger fires when the new volume matches the threshold rule. If you only want to react when volume crosses a level, use Media player volume crossed threshold.
  • Threshold helper entities must use % as the unit. If you want to adjust the limit from the UI, create a helperA helper is a virtual entity you create inside Home Assistant. It is not backed by a physical device. Helpers store values, track state, or do calculations that your automations and dashboards need. [Learn more] separately first.
  • Media players that are unavailable or unknown do not provide usable volume values until they report a supported state again.

Try it yourself

Ready to test this? Go to Settings > Automations & scenes, create a new automation, and add this trigger. Save the automation, then change the state of the targeted entity to watch the trigger fire on your actual entitiesAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more].

More examples

Real scenarios where this trigger fires in automations and scripts. Copy any example and adapt it to your setup.

Tip

You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.

Automation: lower the lights when movie volume goes high

When the receiver volume changes above 60%, dim the room a little more.

  • Trigger: Media player volume changed
    • Target: Living room receiver
    • Threshold: Above 60%
  • Action: Turn on light
    • Target: Living room lights
YAML example for dimming lights when volume gets high
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Dim the lights when volume goes high"
triggers:
  - trigger: media_player.volume_changed
    target:
      entity_id: media_player.living_room_receiver
    options:
      threshold:
        type: above
        value:
          number: 60
actions:
  - action: light.turn_on
    target:
      entity_id: light.living_room_lights
    data:
      brightness_pct: 20

Automation: remind you when music volume drops too low

When the kitchen speaker volume changes below 15%, send a notification so you know why it sounds quiet.

  • Trigger: Media player volume changed
    • Target: Kitchen speaker
    • Threshold: Below 15%
  • Action: Send a notification message
    • Target: My Device (notify.my_device)
YAML example for a low-volume reminder
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
alias: "Remind me when the kitchen speaker volume is low"
triggers:
  - trigger: media_player.volume_changed
    target:
      entity_id: media_player.kitchen_speaker
    options:
      threshold:
        type: below
        value:
          number: 15
actions:
  - action: notify.send_message
    target:
      entity_id: notify.my_device
    data:
      message: >
        The kitchen speaker volume is below 15%.

Still stuck?

The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the trigger you’re using and what you expected to happen, or share on our subreddit /r/homeassistant.

Tip

AI assistants like ChatGPT or Claude can also explain triggers or suggest the right one when you describe what you want in plain language.

Related triggers

These triggers work well alongside this one: