Logitech harmony Hub LOVELACE UI Fail

spelling error

- type: entities

thank you Petro HA accepte code but error after :

i go try your config :slight_smile:

The errors are saying unknown card type.

Look at your spacing, it appears as if your elements are at the card indentation level. See how elements says ‘null’? null means empty.

work with :

- type: entities
  title: Harmony Hub
  entities:
    - switch.sfrtv
    - switch.androidtv

but is not lovely lol

again 100000x thank you for your precious help !!!

I would have hoped to have a more beautiful graphic with images of funds and at least I can play on the sound but shame

at least I can turn on and turn off the tv

hello Petro,
New question now if i need send commande via protocol remote.send_command

could you help me please ?
Exemple remote.send_command for VolumeUp and VolumeDown for activity:51830162 (it’s the home cinema)

I have this in my scripts.yaml

### Living room volume up (Denon)
lr_volume_up:
  alias: Volume Up
  sequence:
    - service: remote.send_command
      data:
        entity_id: remote.YOUR_HARMONY
        device: XXXXXXXX # Device ID number
        command:
          - VolumeUp

### Living room volume down (Denon)
lr_volume_down:
  alias: Volume Down
  sequence:
    - service: remote.send_command
      data:
        entity_id: remote.YOUR_HARMONY
        device: XXXXXXXX # Device ID number
        command:
          - VolumeDown

### Living room volume mute (Denon)
lr_volume_mute:
  alias: Volume Mute
  sequence:
    - service: remote.send_command
      data:
        entity_id: remote.YOUR_HARMONY
        device: XXXXXXXX # Device ID number
        command:
          - Mute

thank you i try your script :=)

Hi there,

I’m trying to implement template switches for my Harmony activities, but I’m having a bit of trouble. When I restarted HA after updating my config with the switches none of the new template switches appear as entities. I’m not getting any errors in the UI or the log about failure to setup switch.template or anything like that. Can anyone take a look at my config snippet and point me in the right direction? Note: I haven’t even tried to bring the switches into Lovelace, since the aren’t showing up as entities yet…

  - platform: template
    .
	.
	redacted template sensors here
    .
    .	
          
#Harmony Activities
    switches:
    Sling TV:
          value_template: "{{ is_state_attr('remote.harmony_hub', 'current_activity', 'Watch Sling TV') }}"
          turn_on:
            service: remote.turn_on
            data:
              entity_id: remote.harmony_hub
              activity: 'Watch Sling TV'
          turn_off:
            service: remote.turn_on
            data:
              entity_id: remote.harmony_hub
              activity: 'PowerOff'
              
    ESPN:
          value_template: "{{ is_state_attr('remote.harmony_hub', 'current_activity', 'Watch ESPN') }}"
          turn_on:
            service: remote.turn_on
            data:
              entity_id: remote.harmony_hub
              activity: 'Watch ESPN'
          turn_off:
            service: remote.turn_on
            data:
              entity_id: remote.harmony_hub
              activity: 'PowerOff'
              
    Baseball:
          value_template: "{{ is_state_attr('remote.harmony_hub', 'current_activity', 'Watch Baseball') }}"
          turn_on:
            service: remote.turn_on
            data:
              entity_id: remote.harmony_hub
              activity: 'Watch Baseball'
          turn_off:
            service: remote.turn_on
            data:
              entity_id: remote.harmony_hub
              activity: 'PowerOff'
              
    DVD:
          value_template: "{{ is_state_attr('remote.harmony_hub', 'current_activity', 'Watch a DVD') }}"
          turn_on:
            service: remote.turn_on
            data:
              entity_id: remote.harmony_hub
              activity: 'Watch a DVD'
          turn_off:
            service: remote.turn_on
            data:
              entity_id: remote.harmony_hub
              activity: 'PowerOff'
              
    Chromecast:
          value_template: "{{ is_state_attr('remote.harmony_hub', 'current_activity', 'Watch Chromecast') }}"
          turn_on:
            service: remote.turn_on
            data:
              entity_id: remote.harmony_hub
              activity: 'Watch Chromecast'
          turn_off:
            service: remote.turn_on
            data:
              entity_id: remote.harmony_hub
              activity: 'PowerOff'

Thanks.

  1. Your indentation on each switch is wrong.
  2. You are capitalizing the object_id of the switch. If you want to name your switches, us the friendly_name attribute, that’s what it’s for.
  3. You also use a space in your object_id, that will cause yaml to mess up upon loading. Use underscores and lowercase for ALL object_ids.
  4. You have some extra spaces on all lines under the object_id. Generally, you want to keep 2 spaces per indent

example:

first_indent:
  second_indent:
    third_indent:
      fourth_indent:  Each indent is 2 spaces in from the other indents.

Take a look at the fixed Sling TV switch and apply the changes to the others:

  - platform: template
    .
	.
	redacted template sensors here
    .
    .	
          
#Harmony Activities
    switches:
      sling_tv: #<--------------OBJECT_ID
        friendly_name: Sling TV
        value_template: "{{ is_state_attr('remote.harmony_hub', 'current_activity', 'Watch Sling TV') }}"
        turn_on:
          service: remote.turn_on
          data:
            entity_id: remote.harmony_hub
            activity: 'Watch Sling TV'
        turn_off:
          service: remote.turn_on
          data:
            entity_id: remote.harmony_hub
            activity: 'PowerOff'

Also, for further explanation:

switch.sling_tv # entity_id for your switch
\____/ \______/
   ^       ^
   |       |
domain     |
           |
        object_id
1 Like