I want to share with you the Kodi remote as I couldn’t find it here.
If someone wants to develop this with me, put your own version here.
To-do list
- Playlist button (shows songs from the current playlist or album)
- Volume adjustment (for amplifier)
- Fast forward and backward
- Current track information and picture
- Keyboard button
Here’s the code
ui-lovelace.yaml
# Kodi Remote
- title: Kodi
cards:
- type: vertical-stack
cards:
- type: entities
entities:
- media_player.kodi
- type: horizontal-stack
cards:
#PREVIUOS
- type: entity-button
icon: mdi:skip-previous
name: ''
entity: script.kr_prev
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.kr_prev
hold_action:
action: none
#STOP
- type: entity-button
icon: mdi:stop
name: ''
entity: script.kr_stop
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.kr_stop
hold_action:
action: none
#PLAY PAUSE
- type: entity-button
icon: mdi:play-pause
name: ''
entity: script.kr_play_pause
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.kr_play_pause
hold_action:
action: none
#NEXT
- type: entity-button
icon: mdi:skip-next
name: ''
entity: script.kr_next
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.kr_next
hold_action:
action: none
- type: horizontal-stack
cards:
#HOME
- type: entity-button
icon: mdi:home
name:
entity: script.kr_home
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.kr_home
hold_action:
action: none
# UP
- type: entity-button
icon: mdi:menu-up-outline
name:
entity: script.kr_up
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.kr_up
hold_action:
action: none
# EMPTY
- type: entity-button
icon: mdi:file-excel-box
name:
entity: script.kr_down
tap_action:
action: none
hold_action:
action: none
- type: horizontal-stack
cards:
# LEFT
- type: entity-button
icon: mdi:menu-left-outline
name:
entity: script.kr_left
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.kr_left
hold_action:
action: none
#SELECT
- type: entity-button
icon: mdi:circle-outline
name:
entity: script.kr_select
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.kr_select
hold_action:
action: none
#RIGHT
- type: entity-button
icon: mdi:menu-right-outline
name:
entity: script.kr_right
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.kr_right
hold_action:
action: none
- type: horizontal-stack
cards:
#BACK
- type: entity-button
icon: mdi:undo-variant
name:
entity: script.kr_back
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.kr_back
hold_action:
action: none
# DOWN
- type: entity-button
icon: mdi:menu-down-outline
name:
entity: script.kr_down
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.kr_down
hold_action:
action: none
# EMPTY
- type: entity-button
icon: mdi:skip-next
name: ''
entity: script.kr_playlist
tap_action:
action: more-info
service: script.turn_on
service_data:
entity_id: script.kr_playlist
hold_action:
action: none
script.yaml
# Kodi Remote
kr_up:
alias: ''
sequence:
- alias: 'Kodi Remote Up'
data:
entity_id: media_player.kodi
method: Input.Up
service: media_player.kodi_call_method
kr_down:
alias: ''
sequence:
- alias: 'Kodi Remote Down'
data:
entity_id: media_player.kodi
method: Input.Down
service: media_player.kodi_call_method
kr_left:
alias: ''
sequence:
- alias: 'Kodi Remote Left'
data:
entity_id: media_player.kodi
method: Input.Left
service: media_player.kodi_call_method
kr_right:
alias: ''
sequence:
- alias: 'Kodi Remote Right'
data:
entity_id: media_player.kodi
method: Input.Right
service: media_player.kodi_call_method
kr_select:
alias: ''
sequence:
- alias: 'Kodi Remote Select'
data:
entity_id: media_player.kodi
method: Input.Select
service: media_player.kodi_call_method
kr_home:
alias: ''
sequence:
- alias: 'Kodi Remote Home'
data:
entity_id: media_player.kodi
method: Input.Home
service: media_player.kodi_call_method
kr_back:
alias: ''
sequence:
- alias: 'Kodi Remote Back'
data:
entity_id: media_player.kodi
method: Input.Back
service: media_player.kodi_call_method
kr_next:
alias: ''
sequence:
- alias: 'Kodi Remote Next'
data:
entity_id: media_player.kodi
service: media_player.media_next_track
kr_prev:
alias: ''
sequence:
- alias: 'Kodi Remote Prev'
data:
entity_id: media_player.kodi
service: media_player.media_previous_track
kr_play_pause:
alias: ''
sequence:
- alias: 'Kodi Remote PlayPause'
data:
entity_id: media_player.kodi
service: media_player.media_play_pause
kr_stop:
alias: ''
sequence:
- alias: 'Kodi Remote Stop'
data:
entity_id: media_player.kodi
service: media_player.media_stop
kr_playlist:
alias: ''
sequence:
- alias: 'Kodi Remote Playlist'
data:
entity_id: media_player.kodi
method: Audio.Details.Album
service: media_player.kodi_call_method