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.
Prerequisites
Have a least one media_player configured. Multiple entities also work .
Blueprint:
blueprint:
name: Media Player - Volume limit
description: Reduce the volume of media player to the default level, if limit is
exceeded
domain: automation
author: N1c093
input:
media_player:
name: Media Player
description: 'Specify which media_player should trigger this automation. Multiple Media Player also work'
selector:
entity:
domain: media_player
multiple: true
volume_limit:
name: Volume limit
description: Select the volume limit which should trigger this automation. For
example "0.7"
default: 0.7
selector:
number:
min: 0.1
max: 1.0
mode: slider
step: 0.05
default_volume:
name: Default volume
description: Select the default volume level. For example "0.2"
default: 0.2
selector:
number:
min: 0.1
max: 1.0
mode: slider
step: 0.05
condition:
name: (optional) Automation condition
default:
description: You can configure an optional condition for this automation.
selector:
condition:
source_url: https://community.home-assistant.io/t/media-player-volume-limit/261229
mode: parallel
max: 10
trigger:
platform: numeric_state
entity_id: !input 'media_player'
attribute: volume_level
above: !input 'volume_limit'
condition: !input 'condition'
action:
- service: media_player.volume_set
data:
volume_level: !input 'default_volume'
entity_id: '{{ trigger.entity_id }}'
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: https://www.home-assistant.io/integrations/media_player/
Ahh I was trying to manually add it as I did not see that import blueprint button that you see on some blueprint web pages. I didn’t realize you could just copy and paste this web url. Imported fine.
Hey there. This is a really useful blueprint. Would you mind adding the newly introduced option for conditions to it? Or add an option to select a “kill switch” as I would like to disable the limiter somehow. I created a helper switch called binary_sensor.party_mode.