I’m trying to build a universal media player for the AmpliPi. For whatever reason, I cannot get any of the media controls (play/pause/next/prev) to appear. I have verified that my rest_command is functioning through the developer tools section. Any pointers appreciated.
media_player.yaml:
- platform: universal
name: AmpliPi Zone 1
commands:
volume_up:
service: rest_command.amplipi_zone_vol
data:
zoneId: 1
volume: "{{ states('sensor.amplipi_zone_1_volume') | default(0.00) | float + 0.01 }}"
volume_down:
service: rest_command.amplipi_zone_vol
data:
zoneId: 1
volume: "{{ states('sensor.amplipi_zone_1_volume') | default(0.00) | float - 0.01 }}"
volume_set:
service: rest_command.amplipi_zone_vol
data:
zoneId: 1
volume: "{{ volume_level }}"
volume_mute:
service: rest_command.amplipi_zone_mute
data:
zoneId: 1
mute: "{{ is_volume_muted }}"
select_source:
service: rest_command.amplipi_zone_source
data:
zoneId: 1
sourceId: "{{ source }}"
# media_play:
# service: rest_command.amplipi_stream_exec
# data:
# sid: "{{ source }}"
# cmd: "next"
# media_pause:
# service: rest_command.amplipi_stream_exec
# data:
# sid: "{{ source }}"
# cmd: "next"
# media_previous_track:
# service: rest_command.amplipi_stream_exec
# data:
# sid: "{{ source }}"
# cmd: "next"
media_next_track:
service: rest_command.amplipi_stream_exec
data: {sid: 1002, cmd: next}
attributes:
volume_level: sensor.amplipi_zone_1_volume
is_volume_muted: sensor.amplipi_zone_1|mute
state: sensor.amplipi_zone_1
source: sensor.amplipi_zone_1_source
source_list: input_select.amplipi_inputs|options
device_class: speaker
rest_command.yaml:
amplipi_stream_exec:
url: http://X.X.X.X/api/streams/{{ sid }}/{{ cmd }}
method: POST
headers:
accept: "application/json"