Do not adjust volume if muted
This commit is contained in:
@@ -21,6 +21,9 @@ input_boolean:
|
|||||||
ht_adjust_volume_hvac:
|
ht_adjust_volume_hvac:
|
||||||
name: Home Theater Adjust Volume for HVAC
|
name: Home Theater Adjust Volume for HVAC
|
||||||
|
|
||||||
|
ht_volume_adjusted:
|
||||||
|
name: Home Theater Volume is Adjusted
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Media Player Scripts
|
# Media Player Scripts
|
||||||
script:
|
script:
|
||||||
@@ -127,7 +130,9 @@ automation:
|
|||||||
to: "on"
|
to: "on"
|
||||||
condition:
|
condition:
|
||||||
- "{{ is_state('input_boolean.ht_adjust_volume_hvac', 'on') }}"
|
- "{{ is_state('input_boolean.ht_adjust_volume_hvac', 'on') }}"
|
||||||
|
- "{{ is_state('input_boolean.ht_volume_adjusted', 'off') }}"
|
||||||
- "{{ is_state('media_player.living_room_receiver', 'on') }}"
|
- "{{ is_state('media_player.living_room_receiver', 'on') }}"
|
||||||
|
- "{{ is_state_attr('media_player.living_room_receiver', 'is_volume_muted', 'off') }}"
|
||||||
action:
|
action:
|
||||||
- repeat:
|
- repeat:
|
||||||
count: 6
|
count: 6
|
||||||
@@ -138,6 +143,10 @@ automation:
|
|||||||
target:
|
target:
|
||||||
entity_id: media_player.living_room_receiver
|
entity_id: media_player.living_room_receiver
|
||||||
|
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.ht_volume_adjusted
|
||||||
|
|
||||||
- alias: Turn Down Volume when HVAC Fan Stops
|
- alias: Turn Down Volume when HVAC Fan Stops
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
@@ -148,7 +157,9 @@ automation:
|
|||||||
seconds: 45
|
seconds: 45
|
||||||
condition:
|
condition:
|
||||||
- "{{ is_state('input_boolean.ht_adjust_volume_hvac', 'on') }}"
|
- "{{ is_state('input_boolean.ht_adjust_volume_hvac', 'on') }}"
|
||||||
|
- "{{ is_state('input_boolean.ht_volume_adjusted', 'on') }}"
|
||||||
- "{{ is_state('media_player.living_room_receiver', 'on') }}"
|
- "{{ is_state('media_player.living_room_receiver', 'on') }}"
|
||||||
|
- "{{ is_state_attr('media_player.living_room_receiver', 'is_volume_muted', 'off') }}"
|
||||||
action:
|
action:
|
||||||
- repeat:
|
- repeat:
|
||||||
count: 6
|
count: 6
|
||||||
@@ -158,3 +169,7 @@ automation:
|
|||||||
- service: media_player.volume_down
|
- service: media_player.volume_down
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.living_room_receiver
|
entity_id: media_player.living_room_receiver
|
||||||
|
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.ht_volume_adjusted
|
||||||
|
|||||||
Reference in New Issue
Block a user