Logitech harmony Hub LOVELACE UI Fail

Dear all, i have decided to try the new interface LOVELACE UI and it’s beautifful, i have reconfigured all my items but failed for harmony hub and control tv ! i dont understand why i have try 24h some code… some exemple but nothing work !!! it’s really CRAZY !

Need help if anybody have successfully integrate Harmony hub and TV control to LOVELACE UI

I have view this tread in reddit guy have a super integration for logitech but dont work for me :frowning: https://www.reddit.com/r/homeassistant/comments/9ceu4j/i_made_a_pictureelement_card_to_control_my_tv/

here my integration from configuration.yaml :
remote:

  • platform: harmony
    name: lgtv
    host: 192.168.1.86

and my file harmony_harmony.conf :

Activities
31547838 - Regarder la TV
32707809 - Android Tv
-1 - PowerOff

Device Commands
53413622 - Lecteur multimédia Tanix
PowerToggle
Mute
VolumeDown
VolumeUp
DirectionDown
DirectionLeft
DirectionRight
DirectionUp
OK
Return
Menu
Home
Mouse
51830162 - Logitech Z-5500
PowerToggle
Mute
VolumeDown
VolumeUp
VolumeCenterDown
VolumeCenterUp
Settings
Effect
InputCoax
InputDirect
InputOptical
InputStereo1
InputStereo2
InputStereo3
SubWooferDown
SubWooferUp
SurroundDown
SurroundUp
Test
51830149 - Enregistreur numérique SFR
PowerToggle
0
1
2
3
4
5
6
7
8
9
Mute
VolumeDown
VolumeUp
ChannelPrev
ChannelDown
ChannelUp
DirectionDown
DirectionLeft
DirectionRight
DirectionUp
OK
Stop
Play
Rewind
Pause
FastForward
Record
Menu
Guide
Info
Exit
VOD
51830092 - TV LG
PowerOff
PowerOn
PowerToggle
0
1
2
3
4
5
6
7
8
9
Mute
VolumeDown
VolumeUp
ChannelPrev
ChannelDown
ChannelUp
DirectionDown
DirectionLeft
DirectionRight
DirectionUp
OK
Stop
Play
Rewind
Pause
FastForward
Record
Subtitle
Back
Teletext
Favorite
List
LiveTv
Green
Red
Blue
Yellow
Guide
Info
PageDown
PageUp
Exit
Aspect
Settings
3D
App/*
Input
InputAv1
InputAv2
InputComponent1
InputHdmi1
InputHdmi2
InputHdmi3
InputHdmi4
InputTv
MyApps
Q.Menu
SimpLink
Smart
T.Opt
Tv/Radio

and my file harmony_harmony_hub.conf :

Activities
31547838 - sfttv
32707809 - androidtv
-1 - PowerOff

Device Commands
53413622 - Lecteur multimédia Tanix
PowerToggle
Mute
VolumeDown
VolumeUp
DirectionDown
DirectionLeft
DirectionRight
DirectionUp
OK
Return
Menu
Home
Mouse
51830162 - Logitech Z-5500
PowerToggle
Mute
VolumeDown
VolumeUp
VolumeCenterDown
VolumeCenterUp
Settings
Effect
InputCoax
InputDirect
InputOptical
InputStereo1
InputStereo2
InputStereo3
SubWooferDown
SubWooferUp
SurroundDown
SurroundUp
Test
51830149 - Enregistreur numérique SFR
PowerToggle
0
1
2
3
4
5
6
7
8
9
Mute
VolumeDown
VolumeUp
ChannelPrev
ChannelDown
ChannelUp
DirectionDown
DirectionLeft
DirectionRight
DirectionUp
OK
Stop
Play
Rewind
Pause
FastForward
Record
Menu
Guide
Info
Exit
VOD
51830092 - TV LG
PowerOff
PowerOn
PowerToggle
0
1
2
3
4
5
6
7
8
9
Mute
VolumeDown
VolumeUp
ChannelPrev
ChannelDown
ChannelUp
DirectionDown
DirectionLeft
DirectionRight
DirectionUp
OK
Stop
Play
Rewind
Pause
FastForward
Record
Subtitle
Back
Teletext
Favorite
List
LiveTv
Green
Red
Blue
Yellow
Guide
Info
PageDown
PageUp
Exit
Aspect
Settings
3D
App/*
Input
InputAv1
InputAv2
InputComponent1
InputHdmi1
InputHdmi2
InputHdmi3
InputHdmi4
InputTv
MyApps
Q.Menu
SimpLink
Smart
T.Opt
Tv/Radio

thank you in advance for your time and your help

Dejan

Did you set up the switches in the last post you made? Without those, that guys method will not work in Lovelace.

Also, everything you posted in here will not lead anyone to properly configure lovelace. Everything you posted in here is related to harmony. You’ll need interface entitys in order to make lovelace work. This is configuration of harmony and it does not create anything in the interface.

before testing Lovelace all harmony work, after testing lovelace nothing work… while with domoticz harmony setup work…

this is my current configuration in lovelace.yaml for front room :

#################################################################

Salon

#################################################################

  • icon: mdi:television
    title: Salon
    id: front_room
    cards:
    • type: vertical-stack
      cards:

      • type: picture-entity
        title: Salon Camera
        entity: camera.salon_2
        camera-image: camera.salon_2
        show_info: false
    • type: entities
      entities:

      • switch.wemo_switch
    • type: entities
      title: Yeelight
      entities:

      • light.yeelight_color2_7c49ebb72dd2
    • type: picture
      image: https://cdn.shopify.com/s/files/1/1547/6351/files/returns-2014.jpg
      navigation_path: /lovelace/home/

i have sucessfully add yeelight and camera and wemo switch

but I do not know what to do for the harmony I would like to be able to control my activity and the volume like what could do the post on reedit

Did you add the switches mentioned in this post?

add switch directly in lovelace.yaml ?

yes i have try

and i got this error :
Lovelace

while parsing a block mapping in “/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/ui-lovelace.yaml”, line 220, column 3 expected <block end>, but found ‘<block sequence start>’ in “/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/ui-lovelace.yaml”, line 268, column 5

#################################################################

Salon

#################################################################

  • icon: mdi:television
    title: Salon
    id: front_room
    cards:
    • type: vertical-stack
      cards:

      • type: picture-entity
        title: Salon Camera
        entity: camera.salon_2
        camera-image: camera.salon_2
        show_info: false
    • type: entities
      entities:

      • switch.wemo_switch
    • type: entities
      title: Yeelight
      entities:

      • light.yeelight_color2_7c49ebb72dd2

      • platform: template
        switches:
        sfrtv:
        value_template: “{{ is_state_attr(‘remote.lgtv’, ‘current_activity’, ‘sfrtv’) }}”
        turn_on:
        service: remote.turn_on
        data:
        entity_id: remote.lgtv
        activity: ‘sfrtv’
        turn_off:
        service: remote.turn_on
        data:
        entity_id: remote.lgtv
        activity: ‘PowerOff’

      Android TV

      androidtv:
      value_template: “{{ is_state_attr(‘remote.lgtv’, ‘current_activity’, ‘androidtv’) }}”
      turn_on:
      service: remote.turn_on
      data:
      entity_id: remote.lgtv
      activity: ‘androidtv’
      turn_off:
      service: remote.turn_on
      data:
      entity_id: remote.lgtv
      activity: ‘PowerOff’

    • type: picture
      image: https://cdn.shopify.com/s/files/1/1547/6351/files/returns-2014.jpg
      navigation_path: /lovelace/home/

No, that’s not how this works.

Those switches need to be added in the template switch section of your normal configuration. They in turn will appear in your non-lovelace UI. Has this happened?

To me, it seems like you don’t have a fundamental understanding of how components and component sections work in home assistant and configuration.yaml. You will have a rough time if you don’t take the time to learn this.

EDIT:

Also, Please take the time to post code correctly. Right now you are just pasting your code into your comments without formatting them. Please read and follow the code posting practices covered in the blue ribbon at the top of the page.

ok thank you i read and search but is not really simply

ps : i use home assistant in a QNAP device with directly QPKG i dont have hass.io and is very diffcule to access

It’s on the top of every post on every page inside this forum:

1 Like
SWITCHES.YAML
- platform: template
  switches:
  sfrtv:
    value_template: "{{ is_state_attr('remote.lgtv', 'current_activity', 'sfrtv') }}"
    turn_on:
      service: remote.turn_on
      data:
        entity_id: remote.lgtv
        activity: 'sfrtv'
    turn_off:
      service: remote.turn_on
      data:
        entity_id: remote.lgtv
        activity: 'PowerOff'
  
  # Android TV
  androidtv:
    value_template: "{{ is_state_attr('remote.lgtv', 'current_activity', 'androidtv') }}"
    turn_on:
      service: remote.turn_on
      data:
        entity_id: remote.lgtv
        activity: 'androidtv'
    turn_off:
      service: remote.turn_on
      data:
        entity_id: remote.lgtv
        activity: 'PowerOff'
ui-lovelace.yaml
resources:
  - url: /local/bignumber-card.js?v=0.0.1
    type: js
  - url: /local/monster-card.js?v=0.0.1
    type: js
  - url: /local/gauge-card.js?v=0.0.1
    type: js
  - url: /local/last-motion-card.js?v=0.0.1
    type: js
  - url: /local/card-tracker.js?v=0.0.1
    type: js
  - url: /local/useful-markdown-card.js?v=0.0.1
    type: js
    
#################################################################
#                                                               #
#                            Accueil                            #
#                                                               #
#################################################################

name: Deki's Home
views:
- icon: mdi:home
  title: Accueil
  id: home
  cards:

    # - type: picture-elements
    #   image: /local/hatheme3.jpg
    #   elements:
    #     - type: state-label
    #       entity: sensor.time
    #       style:
    #         top: 8%
    #         left: 10%
    #         color: rgb(249, 251, 255)
    #         text-shadow: 2px 2px DarkSlateGrey
    #         font-family: Trebuchet MS
    #         font-weight: bold
    #         pointer-events: none
    #         text-rendering: optimizeLegibility
    #         -moz-osx-font-smoothing: grayscale
    #         font-smoothing: antialiased
    #         -webkit-font-smoothing: antialiased
            
    #     - type: state-icon
    #       entity: sensor.outside_temp
    #       style:
    #         top: 7.8%
    #         left: 80%
    #         pointer-events: none
    #         max-width: 24px
    #         max-height: 24px
    #         color: rgb(249, 251, 255)
            
    #     - type: state-label
    #       entity: sensor.outside_temp
    #       style:
    #         top: 8%
    #         left: 90%
    #         color: rgb(249, 251, 255)
    #         font-family: Trebuchet MS
    #         font-weight: bold
    #         text-shadow: 2px 2px DarkSlateGrey
    #         text-rendering: optimizeLegibility
    #         -moz-osx-font-smoothing: grayscale
    #         font-smoothing: antialiased
    #         -webkit-font-smoothing: antialiased
            
    #     - type: state-label
    #       entity: sensor.time_of_day
    #       style:
    #         top: 40%
    #         left: 50%
    #         color: rgb(249, 251, 255)
    #         font-size: 200%
    #         pointer-events: none
    #         text-shadow: 2px 2px DarkSlateGrey
    #         font-family: Trebuchet MS
    #         font-style: oblique
    #         font-weight: 400
    #         text-rendering: optimizeLegibility
    #         -moz-osx-font-smoothing: grayscale
    #         font-smoothing: antialiased
    #         -webkit-font-smoothing: antialiased
            
    #     - type: state-label
    #       entity: sensor.outside_alerts
    #       style:
    #         top: 52%
    #         left: 50%
    #         color: rgb(249, 251, 255)
    #         font-family: Trebuchet MS
    #         font-style: oblique
    #         text-shadow: 2px 2px DarkSlateGrey
    #         font-size: 120%
    #         pointer-events: none
    #         font-weight: 400
    #         text-rendering: optimizeLegibility
    #         -moz-osx-font-smoothing: grayscale
    #         font-smoothing: antialiased
    #         -webkit-font-smoothing: antialiased


    - type: picture-glance
      title: Garage
      image:
      camera_image: camera.garage
      entities:
        - camera.garage
        - camera.enable_motion_detection
        - light.garden_light
        - binary_sensor.front_door

    - type: picture-glance
      title: Veranda
      image:
      navigation_path: /lovelace/kitchen
      camera_image: camera.veranda
      entities:
        - camera.veranda
        - binary_sensor.motion_kitchen
        - input_select.dishwasher_status
        - climate.kitchen

    - type: picture-glance
      title: Salle
      image:
      navigation_path: /lovelace/living_room
      camera_image: camera.salon
      entities:
        - camera.salon
        - binary_sensor.motion_living_room
        - group.living_room_lights
        - switch.living_room_scentsy_relay

    - type: picture-glance
      title: Salon
      image:
      navigation_path: /lovelace/front_room
      camera_image: camera.salon_2
      entities:
        - camera.salon_2
        - binary_sensor.motion_front_room
        - light.front_room_main_light
        
    - type: picture-glance
      image: https://home-assistant-lovelace-gallery.netlify.com/images/living_room.png
      title: Salon
      navigation_path: /lovelace/front_room
      entities:
        - binary_sensor.motion_bedroom
        - switch.power_bedroom_humidifier
        - switch.scentsy_bedroom
        - light.bedroom_main_light
        
    - type: picture-glance
      image: https://www.meubis.be/files/cache/small/files/lester-20sfeer-58ad86b1c1e87.JPG
      title: Salle
      navigation_path: /lovelace/living_room
      entities:
        - binary_sensor.motion_bedroom
        - switch.power_bedroom_humidifier
        - switch.scentsy_bedroom
        - light.bedroom_main_light
        
    - type: picture-glance
      image: https://home-assistant-lovelace-gallery.netlify.com/images/kitchen.png
      title: Cuisine
      navigation_path: /lovelace/kitchen
      entities:
        - binary_sensor.motion_bedroom
        - switch.power_bedroom_humidifier
        - switch.scentsy_bedroom
        - light.bedroom_main_light  

    - type: picture-glance
      image: https://images2.roomstogo.com/is/image/roomstogo/br_rm_belmar_black_pan~Belmar-Black-5-Pc-Queen-Bedroom.jpeg
      title: Chambre
      navigation_path: /lovelace/bedroom
      entities:
        - binary_sensor.motion_bedroom
        - switch.power_bedroom_humidifier
        - switch.scentsy_bedroom
        - light.bedroom_main_light

# "zones"
# outdoor
# kitchen
# living Room
# front Room
# bedroom
# spare Room
# Circulation areas


    - type: glance
      title: Lumière Maison
      entities:
        - entity: light.yeelight_color2_7c49ebb72dd2
          name: Salon
        - entity: light.yeelight_color2_7c49ebb7ff82
          name: Salle
        - entity: light.yeelight_color2_7c49ebb73a90
          name: Cuisine

          
          
          
          
#################################################################
#                                                               #
#                            Salon                              #
#                                                               #
#################################################################


           

- icon: mdi:television
  title: Salon
  id: front_room
  cards:
    - type: vertical-stack
      cards:
        - type: picture-entity
          title: Salon Camera
          entity: camera.salon_2
          camera-image: camera.salon_2
          show_info: false
    - type: entities
      entities: 
        - switch.wemo_switch
    - type: entities
      title: Yeelight
      entities:
        - light.yeelight_color2_7c49ebb72dd2
    - type: picture
      image: https://cdn.shopify.com/s/files/1/1547/6351/files/returns-2014.jpg
      navigation_path: /lovelace/home/

So you are very close, The guy in that post uses picture-elements to make that nice remote. He then uses icon elements using template switches:

  - type: picture-elements
    image: /local/someimage.jpg
    elements:
      - type: icon
        icon: mdi:android
        tap_action: toggle
        entity: switch.androidtv
        style:
          top: 10%
          left: 10%
      - type: icon
        icon: mdi:television
        tap_action: toggle
        entity: switch.lgtv
        style:
          top: 10%
          left: 90%

You’ll have to play around with the style positions and add the image you want.

so i have add code.
I have uploaded all image in www/icons/media_icons/

add code in my ui-lovelace.yaml

- type: picture-elements
image: /local/icons/media_icons/LHarmonyBG.jpg
elements:
  - type: icon
    icon: mdi:android
    tap_action: toggle
    entity: switch.androidtv
    style:
      top: 10%
      left: 10%
  - type: icon
    icon: mdi:television
    tap_action: toggle
    entity: switch.lgtv
    style:
      top: 10%
      left: 90%

and i got this error :

Lovelace

while parsing a block collection in “/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/ui-lovelace.yaml”, line 224, column 5 expected <block end>, but found ‘?’ in “/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/ui-lovelace.yaml”, line 240, column 5

line 224 is :
- type: vertical-stack
line 240 is :
image: /local/icons/media_icons/LHarmonyBG.jpg

Do you have a file in that location?

When you specifiy /local/, that is refering to config/www directory.

So your folder structure should have a www folder inside the config folder.

Quick question, if you enable the home assistant skill in alexa, can you use alexa to turn off these “switches”

Yes, template switches act like a hardware switch:

This is my configuration for Harmony template switches (and a few others):

  - platform: template
    switches:
        # ZONE 1 MEDIA SWITCH
        zone_1:
          value_template: "{{ is_state('media_player.yamaha_receiver', 'on') }}"
          turn_on:
            service: media_player.turn_on
            entity_id: media_player.yamaha_receiver
          turn_off:
            service: media_player.turn_off
            entity_id: media_player.yamaha_receiver
              
        # ZONE 2 MEDIA SWITCH
        zone_2:
          value_template: "{{ is_state('media_player.yamaha_receiver_zone_2', 'on') }}"
          turn_on:
            service: media_player.turn_on
            entity_id: media_player.yamaha_receiver_zone_2
          turn_off:
            service: media_player.turn_off
            entity_id: media_player.yamaha_receiver_zone_2
        
        # XBOX HARMONY ACTIVITY
        xbox_one:
          value_template: "{{ is_state_attr('remote.living_room', 'current_activity', 'Xbox One') }}"
          turn_on:
            service: remote.turn_on
            data:
              entity_id: remote.living_room
              activity: 'Xbox One'
          turn_off:
            service: remote.turn_on
            data:
              entity_id: remote.living_room
              activity: 'PowerOff'
        
        # PLAYSTATION HARMONY ACTIVITY
        ps4:
          value_template: "{{ is_state_attr('remote.living_room', 'current_activity', 'PS4') }}"
          turn_on:
            service: remote.turn_on
            data:
              entity_id: remote.living_room
              activity: 'PS4'
          turn_off:
            service: remote.turn_on
            data:
              entity_id: remote.living_room
              activity: 'PowerOff'
        
        # WII U HARMONY ACTIVITY
        wii_u:
          value_template: "{{ is_state_attr('remote.living_room', 'current_activity', 'Wii U') }}"
          turn_on:
            service: remote.turn_on
            data:
              entity_id: remote.living_room
              activity: 'Wii U'
          turn_off:
            service: remote.turn_on
            data:
              entity_id: remote.living_room
              activity: 'PowerOff'
        
        # PC HARMONY ACTIVITY
        pc:
          value_template: "{{ is_state_attr('remote.living_room', 'current_activity', 'PC') }}"
          turn_on:
            service: remote.turn_on
            data:
              entity_id: remote.living_room
              activity: 'PC'
          turn_off:
            service: remote.turn_on
            data:
              entity_id: remote.living_room
              activity: 'PowerOff'
        
        # SWITCH HARMONY ACTIVITY
        switch:
          value_template: "{{ is_state_attr('remote.living_room', 'current_activity', 'Switch') }}"
          turn_on:
            service: remote.turn_on
            data:
              entity_id: remote.living_room
              activity: 'Switch'
          turn_off:
            service: remote.turn_on
            data:
              entity_id: remote.living_room
              activity: 'PowerOff'
        
        # TV HARMONY ACTIVITY
        tv:
          value_template: "{{ is_state_attr('remote.living_room', 'current_activity', 'TV') }}"
          turn_on:
            service: remote.turn_on
            data:
              entity_id: remote.living_room
              activity: 'TV'
          turn_off:
            service: remote.turn_on
            data:
              entity_id: remote.living_room
              activity: 'PowerOff'
        
        # AUDIO 1, USED FOR ECHO AND MUSIC ZONE 1
        audio_1:
          value_template: "{{ is_state_attr('media_player.yamaha_receiver', 'source', 'Echo') and is_state('switch.floating_outlet_switch', 'on') }}"
          turn_on:
            - service: switch.turn_on
              entity_id: switch.floating_outlet_switch
            - service: media_player.turn_on
              entity_id: media_player.yamaha_receiver
            - service: media_player.select_source
              data:
                entity_id: media_player.yamaha_receiver
                source: Echo
            - service: media_player.volume_set
              data:
                entity_id: media_player.yamaha_receiver
                volume_level: 0.7
          turn_off:
            - service: switch.turn_off
              entity_id: switch.floating_outlet_switch
            - service: media_player.turn_off
              entity_id: media_player.yamaha_receiver

        # AUDIO 2, USED FOR ECHO AND MUSIC ZONE 2
        audio_2:
          value_template: "{{ is_state_attr('media_player.yamaha_receiver_zone_2', 'source', 'Echo') and is_state('switch.floating_outlet_switch', 'on') }}"
          turn_on:
            - service: switch.turn_on
              entity_id: switch.floating_outlet_switch
            - service: media_player.turn_on
              entity_id: media_player.yamaha_receiver_zone_2
            - service: media_player.select_source
              data:
                entity_id: media_player.yamaha_receiver_zone_2
                source: Echo
            - service: media_player.volume_set
              data:
                entity_id: media_player.yamaha_receiver_zone_2
                volume_level: 0.7
          turn_off:
            - service: switch.turn_off
              entity_id: switch.floating_outlet_switch
            - service: media_player.turn_off
              entity_id: media_player.yamaha_receiver_zone_2

And in lovelace, I use a conditional card with a picture-glance card and a few entity cards. Here’s that config:

views:
  - icon: mdi:television
    title: Entertainment
    id: entertainment
    cards:
      - type: vertical-stack
        cards:
          - type: picture-glance
            title: Harmony
            entities:
              - switch.xbox_one
              - switch.ps4
              - switch.wii_u
              - switch.pc
              - switch.switch
              - switch.tv
            state_image:
              "PowerOff": /local/images/power_off.png
              "Xbox One": /local/images/xbox_one_logo.png
              "PS4": /local/images/playstation_logo.png
              "Wii U": /local/images/wiiu_logo.png
              "PC": /local/images/windows_logo.png
              "Switch": /local/images/nintendo_switch_logo.png
              "TV": /local/images/sony_logo.png
            entity: sensor.harmony_activity
          - type: entity-filter
            entities:
              - sensor.redacted
              - sensor.xbox_current
            state_filter:
              - 'Online'
              - 'Home'
              - 'Netflix'
            show_empty: false
      - type: vertical-stack
        cards: 
          - type: picture-glance
            title: Yamaha Receiver
            entities:
              - switch.zone_1
              - switch.audio_1
              - switch.zone_2
              - switch.audio_2
            image: /local/images/rxv677.png
          - type: conditional
            conditions:
              - entity: switch.zone_1
                state: 'on'
              - entity: switch.zone_2
                state: 'on'
            card:
              type: entities
              entities:
                - entity: input_number.yamaha_receiver
                  name: Zone 1 Volume
                - entity: input_number.yamaha_receiver_zone_2
                  name: Zone 2 Volume
          - type: conditional
            conditions:
              - entity: switch.zone_1
                state: 'on'
              - entity: switch.zone_2
                state: 'off'
            card:
              type: entities
              entities:
                - entity: input_number.yamaha_receiver
                  name: Volume
          - type: conditional
            conditions:
              - entity: switch.zone_1
                state: 'off'
              - entity: switch.zone_2
                state: 'on'
            card:
              type: entities
              entities:
                - entity: input_number.yamaha_receiver_zone_2
                  name: Volume

And this is what it ends up looking like:

Powered Off

Xbox On

PlayStation On & Receiver Zone 2 On

2 Likes

some resultat with www

image: /local/www/icons/media_icons/LHarmonyBG.jpg

Lovelace

while parsing a block collection in “/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/ui-lovelace.yaml”, line 224, column 5 expected <block end>, but found ‘?’ in “/share/CACHEDEV1_DATA/.qpkg/Home-Assistant/CONFIG_DIR/ui-lovelace.yaml”, line 240, column 5

ps: i love your interface for power switch

after i have try just

- type: entitites
  title: Harmony
  entities:
    - switch.androidtv
    - switch.lgtv

interface work but this part dont work i have card error in HA :

Picture0002

:man_facepalming:

Your folder structure has the www, not the path you write in the image.

For example:

file location in home assistant OS:

config/www/icons/media_icons/LHarmonyBG.jpg

then your yaml would location would be:

image: /local/icons/media_icons/LHarmonyBG.jpg