I have an IR blaster and have been using it happily to control a number of devices in my study. It has learnt the controls from my CD player which work well but want I want is to create a media player for my CD player and then use the great media player cards with my CD player.
I had hoped I could do this via the universal media player as per the code at the end of this post and although it works well with the custom:mini-media-player there is one glitch with the media-control card. I can turn the player on and then I get a play_pause icon but clicking on it does nothing. However if I use the custom:mini-media-player card to start it, then I can start and pause the play using the media-control card.
Very frustrating - any ideas?
Andrew
media_player:
- platform: universal
name: ET3 CD Player
state_template: >
{% if is_state('input_select.et3_status', 'on') %}
on
{% elif is_state('input_select.et3_status', 'playing') %}
playing
{% elif is_state('input_select.et3_status', 'paused') %}
paused
{% else %}
off
{% endif %}
commands:
turn_on:
service: script.turn_on
target:
entity_id: script.et3_on
turn_off:
service: script.turn_on
target:
entity_id: script.et3_off
media_play:
service: script.turn_on
target:
entity_id: script.et3_play
media_pause:
service: script.turn_on
target:
entity_id: script.et3_pause
media_play_pause:
service: script.turn_on
target:
entity_id: script.et3_play_pause
media_next_track:
service: script.turn_on
target:
entity_id: script.et3_next_track
media_previous_track:
service: script.turn_on
target:
entity_id: script.et3_previous_track
children: []