Skip to content

Instantly share code, notes, and snippets.

@SnoFox
Created May 14, 2023 23:09
Show Gist options
  • Save SnoFox/21324452e97775c3c25dd23b2fd04131 to your computer and use it in GitHub Desktop.
Save SnoFox/21324452e97775c3c25dd23b2fd04131 to your computer and use it in GitHub Desktop.
alias: Set Soundbar Mode
mode: queued
icon: mdi:soundbar
fields:
target:
description: The soundbar to change modes on
required: true
selector:
entity:
filter:
integration: songpal
mode:
description: The sound mode to set the soundbar to
required: true
example: music
default: standard
selector:
select:
options:
- standard
- cinemaStudio
- music
- auto
sequence:
- if:
- condition: template
value_template: "{{ states.input_text.soundbar_mode.state != mode }}"
then:
- service: songpal.set_sound_setting
data:
name: soundField
value: "{{ mode }}"
target:
device_id: "{{ device_id(target) }}"
- service: input_text.set_value
data:
value: "{{ mode }}"
target:
entity_id: input_text.soundbar_mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment