Hi all:
I’m a beginner of HA and trying to add Logitech Harmony universal remote to HomeKit. Following the documentation of Universal Media Player I have first wrapped the remote with the configuration below:
- platform: universal
name: Living Room Media Center
attributes:
state: remote.harmony
source_list: remote.harmony|activity_list
source: remote.harmony|current_activity
commands:
turn_on:
action: remote.turn_on
target:
entity_id: remote.harmony
turn_off:
action: remote.turn_off
target:
entity_id: remote.harmony
volume_up:
action: remote.send_command
target:
entity_id: remote.harmony
data:
device: >
{% if is_state('select.harmony_hub_activities', 'Music') -%}
Stereo Amplifier
{%- else -%}
AV Receiver
{%- endif %}
command:
- VolumeUp
- VolumeUp
delay_secs: 0.2
volume_down:
action: remote.send_command
target:
entity_id: remote.harmony
data:
device: >
{% if is_state('select.harmony_hub_activities', 'Music') -%}
Stereo Amplifier
{%- else -%}
AV Receiver
{%- endif %}
command:
- VolumeDown
- VolumeDown
delay_secs: 0.2
volume_mute:
action: remote.send_command
target:
entity_id: remote.harmony
data:
device: >
{% if is_state('select.harmony_hub_activities', 'Music') -%}
Stereo Amplifier
{%- else -%}
AV Receiver
{%- endif %}
command: Mute
media_play:
action: remote.send_command
target:
entity_id: remote.harmony
data:
device: >
{% if is_state('select.harmony_hub_activities', 'Movie') -%}
Zidoo Player
{%- endif %}
command: Play
media_pause:
action: remote.send_command
target:
entity_id: remote.harmony
data:
device: >
{% if is_state('select.harmony_hub_activities', 'Movie') -%}
Zidoo Player
{%- endif %}
command: Pause
media_previous_track:
action: remote.send_command
target:
entity_id: remote.harmony
data:
device: >
{% if is_state('select.harmony_hub_activities', 'Movie') -%}
Zidoo Player
{%- endif %}
command: SkipBack
media_next_track:
action: remote.send_command
target:
entity_id: remote.harmony
data:
device: >
{% if is_state('select.harmony_hub_activities', 'Movie') -%}
Zidoo Player
{%- endif %}
command: SkipForward
select_source:
action: remote.turn_on
target:
entity_id: remote.harmony
data:
activity: "{{ source }}"
device_class: receiver
unique_id: livingroom_mediacenter
I then added the following configuration to expose the media player to Homekit:
homekit:
- name: "Living Room Harmony"
auto_start: true
mode: accessory
filter:
include_entities:
- media_player.living_room_media_center
entity_config:
media_player.living_room_media_center:
name: "Living Room Harmony"
feature_list:
- feature: on_off
- feature: play_pause
- feature: toggle_mute
However I can’t seem to get toggle_mute and play_pause to work. In HomeKit widget when I click the button, nothing happens, and there is no error in the log.
I understand both mute toggle and play_pause are controlled by the media player, and I have tried several things today without luck. Appreciate if anybody who has similar setup can point me where to look!