Media Player - Volume limit

Tags: #<Tag:0x00007fc400ceb758> #<Tag:0x00007fc400ceb640>

Hello HA-community

I like to share my first blueprint with you.
This blueprint limits/reduce the volume of any media_player entity. It detects the current volume of the specified media_player, if this value exceeds the limit value its reset the volume to the default volume.

This blueprint can be useful if your children maximise the volume by accident. I’m using it for my alexa speaker, because there is currently no volume limit build in.

Sadly you have to type the media_player entities manually. At the moment the selector doesn’t allow multiple entities, so this is the workaround.

Have a least one media_player configured. Multiple entities also work with comma separated.


  name: Media Player - Volume limit
  description: Reduce the volume of media player to the default level, if limit is
  domain: automation
      name: Media Player
      description: 'Specify which media_player should trigger this automation. Comma
        seperated list is possible. For example: media_player.bathroom,'
      name: Volume limit
      description: Select the volume limit which should trigger this automation. For
        example "0.7"
      default: 0.7
          min: 0.1
          max: 1.0
          mode: slider
          step: 0.05
      name: Default volume
      description: Select the default volume level. For example "0.2"
      default: 0.2
          min: 0.1
          max: 1.0
          mode: slider
          step: 0.05
mode: parallel
max: 10
  platform: numeric_state
  entity_id: !input 'media_player'
  attribute: volume_level
  above: !input 'volume_limit'
- service: media_player.volume_set
    volume_level: !input 'default_volume'
    entity_id: '{{ trigger.entity_id }}'

I hope you like it. Any feedback is welcome :slight_smile:

you can use a target selector, so you can use multiple entities

  • all the media_players has to have the attribute volume_level << with this specific name
    can be a problem

Thank you, for your feedback :+1:

Sadly the target selector doesn’t work for triggers, it’s only made for service calls , see:
Hopefully there will be a solution for it in the future.

Isn’t the attribute volume_level the same on every media_player? I thought it will be the same on every integration, because the attribute at the service media_player.volume_set is also volume_level see:

1 Like

Great idea - could be improved by allowing time of day this applies. (during day, kids can play louder, at night it needs to be low).