From 623abc3d0bf5bd8ba872827c1ed22cef63c0011f Mon Sep 17 00:00:00 2001 From: Flab <118143714+Flight-Lab@users.noreply.github.com> Date: Tue, 21 Jan 2025 23:07:55 -0500 Subject: [PATCH 1/7] Expand Music Volume Verb Options - sentence trigger add raise & lower as options --- .../Device_Functions/blueprint-devicefunctions.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml b/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml index 7a79ac36..2daee3a9 100644 --- a/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml +++ b/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml @@ -42,11 +42,11 @@ blueprint: music_volume_up: name: Music volume up command description: The command to use to turn up the music volume - default: "[turn up | increase] [the] music [volume]" + default: "[turn up | increase | raise] [the] music [volume]" music_volume_down: name: Music volume down command description: The command to use to turn down the music volume - default: "[turn down | decrease] [the] music [volume]" + default: "[turn down | decrease | lower] [the] music [volume]" pause_music: name: Music pause resume command description: The command to use to pause or resume the Music From 11a9fd311e30c0548f4445a4bb9689a3a18b3c69 Mon Sep 17 00:00:00 2001 From: Flab <118143714+Flight-Lab@users.noreply.github.com> Date: Tue, 21 Jan 2025 23:23:28 -0500 Subject: [PATCH 2/7] Set Specific Music Volume Set music volume to a specific level. --- .../blueprint-devicefunctions.yaml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml b/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml index 2daee3a9..7c4e2587 100644 --- a/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml +++ b/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml @@ -39,6 +39,11 @@ blueprint: name: Stop Music Command description: The command to use to stop music playback default: "stop [the] music" + set_music_volume: + name: Set Music Volume Command + description: The command to use to set music player volume level directly + default: + "[set | turn | change] [the] music [volume | level] [to] {level}" music_volume_up: name: Music volume up command description: The command to use to turn up the music volume @@ -99,6 +104,9 @@ trigger: - platform: conversation command: !input stop_music id: stop_music + - trigger: conversation + command: !input set_music_volume + id: set_music_volume - platform: conversation command: !input music_volume_up id: music_volume_up @@ -276,6 +284,27 @@ action: entity_id: "{{ target_timer_device }}" data: {} - set_conversation_response: Music stopped + - conditions: + - condition: trigger + id: + - set_music_volume + - condition: template + value_template: "{{target_musicplayer_device != target_mediaplayer_device}}" + sequence: + - action: media_player.volume_set + data: + volume_level: |- + {% if trigger.id == "set_music_volume" %} + {% if trigger.slots.level.endswith('%') %} + {{ (trigger.slots.level |replace('%',' ') | int)/100 }} + {% else %} + {{ (trigger.slots.level | int)/10 }} + {% endif %} + {% endif %} + target: + entity_id: "{{ target_musicplayer_device }}" + - set_conversation_response: Volume set to {{ trigger.slots.level }} + enabled: true - conditions: - condition: trigger id: From 0598cc64e39b43199aeb1e6754d44c2bb7d6e638 Mon Sep 17 00:00:00 2001 From: Flab <118143714+Flight-Lab@users.noreply.github.com> Date: Tue, 21 Jan 2025 23:38:36 -0500 Subject: [PATCH 3/7] Fix indent and trigger input name Correct indents for triggers. Correct input name in triggers for pause_music. --- .../Device_Functions/blueprint-devicefunctions.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml b/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml index 7c4e2587..3d9a0af6 100644 --- a/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml +++ b/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml @@ -113,10 +113,10 @@ trigger: - platform: conversation command: !input music_volume_down id: music_volume_down - - platform: conversation - command: !input pause + - platform: conversation + command: !input pause_music id: pause_music - - platform: conversation + - platform: conversation command: !input next_song id: next_song condition: [] From 93bdaa5d4bd19c261538eece071e980adb22996b Mon Sep 17 00:00:00 2001 From: Flab <118143714+Flight-Lab@users.noreply.github.com> Date: Wed, 22 Jan 2025 01:46:18 -0500 Subject: [PATCH 4/7] Remove response Remove assist response when setting music volume as to not distract from music. --- .../Device_Functions/blueprint-devicefunctions.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml b/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml index 3d9a0af6..052cf26f 100644 --- a/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml +++ b/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml @@ -18,7 +18,7 @@ blueprint: dnd_command: name: Do Not Disturb Command description: The command to use to trigger turning off DND mode - default: "(set do not disturb [mode] [to] off | turn off do not disturb [mode] | end do not disturb [mode] | cancel do not disturb [mode])" + default: "( do not disturb [mode] [to] off | turn off do not disturb [mode] | end do not disturb [mode] | cancel do not disturb [mode])" set_volume: name: Set Volume Command description: The command to use to set volume level directly @@ -303,8 +303,6 @@ action: {% endif %} target: entity_id: "{{ target_musicplayer_device }}" - - set_conversation_response: Volume set to {{ trigger.slots.level }} - enabled: true - conditions: - condition: trigger id: From 2cadff0c9104224addc70c83d27fe7c40b5bd53d Mon Sep 17 00:00:00 2001 From: Flab <118143714+Flight-Lab@users.noreply.github.com> Date: Wed, 22 Jan 2025 11:52:53 -0500 Subject: [PATCH 5/7] remove vestiges --- .../Device_Functions/blueprint-devicefunctions.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml b/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml index 052cf26f..f1ee84ed 100644 --- a/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml +++ b/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml @@ -288,8 +288,6 @@ action: - condition: trigger id: - set_music_volume - - condition: template - value_template: "{{target_musicplayer_device != target_mediaplayer_device}}" sequence: - action: media_player.volume_set data: From 7faf4c458ae1f18d6c1337816b30867b457cfdd6 Mon Sep 17 00:00:00 2001 From: Flab <118143714+Flight-Lab@users.noreply.github.com> Date: Wed, 22 Jan 2025 12:45:00 -0500 Subject: [PATCH 6/7] Mute Music Command --- .../blueprint-devicefunctions.yaml | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml b/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml index f1ee84ed..6bee6108 100644 --- a/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml +++ b/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml @@ -51,7 +51,15 @@ blueprint: music_volume_down: name: Music volume down command description: The command to use to turn down the music volume - default: "[turn down | decrease | lower] [the] music [volume]" + default: "[turn down | decrease | lower] [the] music [volume]" + mute_music_volume: + name: Mute Volume Command + description: The command to use to mute the music player + default: mute [the] music [volume] + unmute_music_volume: + name: Unmute Volume Command + description: The command to use to unmute the music player + default: unmute [the] music [volume] pause_music: name: Music pause resume command description: The command to use to pause or resume the Music @@ -113,6 +121,12 @@ trigger: - platform: conversation command: !input music_volume_down id: music_volume_down + - trigger: conversation + command: !input mute_music_volume + id: mute_music_volume + - trigger: conversation + command: !input unmute_music_volume + id: unmute_music_volume - platform: conversation command: !input pause_music id: pause_music @@ -318,6 +332,26 @@ action: action: media_player.volume_down target: entity_id: '{{ target_musicplayer_device }}' + - conditions: + - condition: trigger + id: + - mute_music_volume + sequence: + - action: media_player.volume_mute + data: + is_volume_muted: true + target: + entity_id: "{{ target_musicplayer_device }}" + - conditions: + - condition: trigger + id: + - unmute_music_volume + sequence: + - action: media_player.volume_mute + data: + is_volume_muted: false + target: + entity_id: "{{ target_musicplayer_device }}" - conditions: - condition: trigger id: From 47e40e9f8e0a28519462a18a8cef6715852587d3 Mon Sep 17 00:00:00 2001 From: Flab <118143714+Flight-Lab@users.noreply.github.com> Date: Wed, 22 Jan 2025 12:54:45 -0500 Subject: [PATCH 7/7] fixing an accident I accidentally deleted a word. Oops. Now it's back. --- .../Device_Functions/blueprint-devicefunctions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml b/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml index 6bee6108..5f807d59 100644 --- a/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml +++ b/View_Assist_custom_sentences/Device_Functions/blueprint-devicefunctions.yaml @@ -18,7 +18,7 @@ blueprint: dnd_command: name: Do Not Disturb Command description: The command to use to trigger turning off DND mode - default: "( do not disturb [mode] [to] off | turn off do not disturb [mode] | end do not disturb [mode] | cancel do not disturb [mode])" + default: "(set do not disturb [mode] [to] off | turn off do not disturb [mode] | end do not disturb [mode] | cancel do not disturb [mode])" set_volume: name: Set Volume Command description: The command to use to set volume level directly