Kodi Remote

Figured it out, moving the text and done paramaters out of the params worked, however using Input.SendText only sends to the virtual keyboard, so won’t do what I needed, ended up using Input.ExecuteAction

kodi_toggle_watched:
  alias: Kodi Toggle Watched
  sequence:
  - service: kodi.call_method
    data_template:
      entity_id: >-
        {% if is_state('input_select.logitech_remote_select_dw', "Media Room") %}
          media_player.kodi_media_center_pc
        {% elif is_state('input_select.logitech_remote_select_dw', "Bedroom") %}
          media_player.kodi_bedroom_pc
        {% elif is_state('input_select.logitech_remote_select_dw', "Guest Room 1") %}
          media_player.kodi_guest_bedroom_1
        {% elif is_state('input_select.logitech_remote_select_dw', "Guest Room 2") %}
          media_player.kodi_guest_bedroom_2
        {% endif %}
      method: Input.ExecuteAction
      action: togglewatched

It is funny how you all seem to know exactly where to put what code. For a beginner all this yaml is very confusing. I have tried several places to put this but all I get is errors.

Most youtube videos are old and stop after installation. The configuring of the devices with endless possibilities has me puzzled beyond belief. Is there a good tutorial website? I am trying to build mine at https://arkor.nl

Thanks for any advice and help.

Sometimes, when subtitles aren’t embedded in the video or haven’t been downloaded before (I have subliminal installed but it may not find the subtitles), I have to download them manually. So “Next subtitle” doesn’t work… I am using yatse as a fallback to do that. There is button for that in Yatse. This is the only piece that it missing in my kodi remote. Is there a way to launch the “download subtitle” menu in kodi from HA?

Thanks,

GV

Start simple. We all did. There’s no use jumping in the deep end with complex templates and custom Lovelace cards when you have not yet mastered the basics.

Read the documentation, there are plenty of examples.

Thanks Tom
Installing HA and adding my devices is simple and don’t need much explanation. Installing add-ons is also ok. I think I am getting confused by the new Lovelace and the fact that lots of info isn’t based on it. And there will always be yaml of course to deal with.
Thanks again

I hope so :slight_smile:

Hi and awsome card, I have a newbie question when I paste the code in lovelace I get the error
Error: Custom element not found: tiles-card

Am I missing something?

Hi how do you implement this code? Where do you install it? Sorrry I’m really new to this and trying to understand

Yes you are missing the custom tiles card. However I would not recommend installing it as it has been unsupported for some time. A better choice is the custom button card.

Card:

entities:
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_kodi_input_home
        icon: 'mdi:home'
        name: Home
        tap_action:
          service: script.lounge_kodi_input_home
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_contectx_menu
        icon: 'mdi:menu'
        name: Menu
        tap_action:
          service: script.lounge_kodi_input_contectx_menu
        template: menu_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_up
        icon: 'mdi:arrow-up-bold'
        name: Up
        tap_action:
          service: script.lounge_kodi_input_up
        styles:
          card:
            - background: var(--secondary-background-color-alpha)
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_info
        icon: 'mdi:information-outline'
        name: Info
        tap_action:
          service: script.lounge_kodi_input_info
        template: menu_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_kodi_player_play_pause
        icon: 'mdi:play-pause'
        name: Play/Pause
        tap_action:
          service: script.lounge_kodi_player_play_pause
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_left
        icon: 'mdi:arrow-left-bold'
        name: Left
        tap_action:
          service: script.lounge_kodi_input_left
        styles:
          card:
            - background: var(--secondary-background-color-alpha)
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_select
        icon: 'mdi:check-circle-outline'
        name: Ok
        tap_action:
          service: script.lounge_kodi_input_select
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_right
        icon: 'mdi:arrow-right-bold'
        name: Right
        tap_action:
          service: script.lounge_kodi_input_right
        styles:
          card:
            - background: var(--secondary-background-color-alpha)
        template: icon_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_kodi_player_stop
        icon: 'mdi:stop'
        name: Stop
        tap_action:
          service: script.lounge_kodi_player_stop
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_back
        icon: 'mdi:backburger'
        name: Return
        tap_action:
          service: script.lounge_kodi_input_back
        template: menu_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_down
        icon: 'mdi:arrow-down-bold'
        name: Down
        tap_action:
          service: script.lounge_kodi_input_down
        styles:
          card:
            - background: var(--secondary-background-color-alpha)
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_next_subtitle
        icon: 'mdi:subtitles-outline'
        name: Subtitle
        tap_action:
          service: script.lounge_kodi_input_next_subtitle
        template: menu_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_kodi_player_rewind
        icon: 'mdi:rewind'
        name: Rewind
        tap_action:
          service: script.lounge_kodi_player_rewind
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_player_fast_fwd
        icon: 'mdi:fast-forward'
        name: Forward
        tap_action:
          service: script.lounge_kodi_player_fast_fwd
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_player_skip_back
        icon: 'mdi:skip-previous'
        name: Skip Back
        tap_action:
          service: script.lounge_kodi_player_skip_back
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_player_skip_fwd
        icon: 'mdi:skip-next'
        name: Skip Fwd
        tap_action:
          service: script.lounge_kodi_player_skip_fwd
        template: icon_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_kodi_player_skip_back_30
        icon: 'mdi:rewind-30'
        name: Back 30s
        tap_action:
          service: script.lounge_kodi_player_skip_back_30
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_player_skip_back_10
        icon: 'mdi:rewind-10'
        name: Back 10s
        tap_action:
          service: script.lounge_kodi_player_skip_back_10
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_player_skip_fwd_10
        icon: 'mdi:fast-forward-10'
        name: Fwd 10s
        tap_action:
          service: script.lounge_kodi_player_skip_fwd_10
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_player_skip_fwd_30
        icon: 'mdi:fast-forward-30'
        name: Fwd 30s
        tap_action:
          service: script.lounge_kodi_player_skip_fwd_30
        template: icon_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
show_header_toggle: false
title: Kodi Remote
type: entities

Button templates:

  icon_button:
    aspect_ratio: 4/3
    color_type: icon
    hold_action:
      action: none
    layout: vertical
    show_label: false
    show_name: false
    show_state: false
    styles:
      card:
        - border-radius: 10px
        - border: solid 1px var(--primary-color)
        - box-shadow: none
        - padding: 6px 6px
        - margin: 0px 0px
        - '--paper-card-background-color': 'rgba(0, 0, 0, 0)'
      icon:
        - width: 28px
      name:
        - justify-self: middle
        - align-self: end
        - font-size: 14px
        - padding: 0px 0px
        - color: var(--secondary-text-color)
    tap_action:
      action: call-service

  menu_button:
    aspect_ratio: 4/3
    color_type: icon
    hold_action:
      action: none
    layout: vertical
    show_label: false
    show_name: true
    show_state: false
    styles:
      card:
        - border-radius: 10px
        - border: solid 1px var(--primary-color)
        - box-shadow: none
        - padding: 6px 6px
        - margin: 0px 0px
        - '--paper-card-background-color': 'rgba(0, 0, 0, 0)'
      icon:
        - width: 28px
      name:
        - justify-self: middle
        - align-self: end
        - font-size: 14px
        - padding: 0px 0px
        - color: var(--secondary-text-color)
    tap_action:
      action: call-service
1 Like

Thank you!! Just a newbie question where do I put the button templates???

The very top of the raw lovelace config is a good place:

Screenshot_2020-05-22 Overview - Home Assistant

Note that there was an error in my card configuration. I have updated my post with the correct card config.

Also you will require this custom card for it to work correctly:

Hi iam Maxim! Iam from Russia.
Please help me. No work button

type: button
tap_action:
action: call-service
service: kodi.call_method
service_data: null
method: Input.Down
entity_id: media_player.kodi
hold_action:
action: more-info
show_icon: true
show_name: true
entity: media_player.kodi
name: DOWN
icon: ‘mdi:menu-down’

worked for me, thankyou for sharing!

1 Like

Hello All.

i was using this amazing card and it runned just so fine untill, juste after 0.113 update, it stops running.

Every other HA commands still running except this Kodi remonte.

Best investigation starting point ?

Thanks

@slipx06
Would you mind sharing the template (remote_button_round) you used? Really liked it :slight_smile:

No problem

remote_button_normal:
  styles:
#    icon:
#      - color: var(--primary-color)
    card:
      - border-radius: 0px
      - height: 75px
#      - opacity: 0.5
remote_button_round:
  template: remote_button_normal
  styles:
    card:
      - border-radius: 15px

Hello,

Since 0.115 release, the remote does not work anymore there.
Is anyone facing the same issue ?

Thanks

Have you removed your YAML Kodi integration config and added Kodi back using the UI?

See https://www.home-assistant.io/blog/2020/09/17/release-115/#integrations-now-available-to-set-up-from-the-ui

Thanks for your reply Tom_i.
No, I didn’t, because -shame on me- i didn’t read the release page…
So, I have to remove the kodi integration from my configuration.yaml, and then add Kodi using UI, right (sorry, still nob there)
Thanks again