Add HVAC Volume Adjustment to Media Package
This commit is contained in:
@@ -15,6 +15,12 @@ input_select:
|
||||
- Unknown
|
||||
initial: Idle
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Media Player Configuration Switches
|
||||
input_boolean:
|
||||
ht_adjust_volume_hvac:
|
||||
name: Home Theater Adjust Volume for HVAC
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Media Player Scripts
|
||||
script:
|
||||
@@ -113,3 +119,35 @@ automation:
|
||||
entity_id: media_player.living_room_roku
|
||||
action:
|
||||
- service: script.ht_player_state_update
|
||||
|
||||
- alias: Turn Up Volume when HVAC Fan Starts
|
||||
trigger:
|
||||
- platform: template
|
||||
value_template: >
|
||||
{{ iif('Running' in state_attr('climate.thermostat', 'fan_state'), 'true', 'false') }}
|
||||
condition:
|
||||
- condition: "{{ is_state('input_boolean.ht_adjust_volume_hvac', 'on') }}"
|
||||
- condition: "{{ is_state('media_player.living_room_receiver', 'on') }}"
|
||||
action:
|
||||
- repeat:
|
||||
count: 6
|
||||
sequence:
|
||||
- service: media_player.volume_up
|
||||
target:
|
||||
entity_id: media_player.living_room_receiver
|
||||
|
||||
- alias: Turn Down Volume when HVAC Fan Stops
|
||||
trigger:
|
||||
- platform: template
|
||||
value_template: >
|
||||
{{ iif('Running' in state_attr('climate.thermostat', 'fan_state'), 'false', 'true') }}
|
||||
condition:
|
||||
- condition: "{{ is_state('input_boolean.ht_adjust_volume_hvac', 'on') }}"
|
||||
- condition: "{{ is_state('media_player.living_room_receiver', 'on') }}"
|
||||
action:
|
||||
- repeat:
|
||||
count: 6
|
||||
sequence:
|
||||
- service: media_player.volume_down
|
||||
target:
|
||||
entity_id: media_player.living_room_receiver
|
||||
|
||||
Reference in New Issue
Block a user