Harmony Hub Entities work fine in non-lovelace but in ui-ovelace config throwing error

I have these two entities in lovelace ui called remote.living_room and remote.downstairs, they work fine in non-loevlace, but in ui-lovelace, i am getting this error

Error when i click on my entity:

No activity specified with turn_on service

6:28 PM components/remote/harmony.py (ERROR)

lovelace.yaml file:

resources:
  - url: /local/custom-lovelace/upcoming-media-card/upcoming-media-card.js?v=0.2.2
    type: js
  - url: /local/custom_ui/ecobee-card.js
    type: js
  - url: /local/card-modder.js
    type: module
  - url: /local/custom_ui/weather-card.js
    type: js
  - url: /local/custom_ui/layout-card.js
    type: js
  - url: /local/custom_ui/dark-sky-weather-card.js
    type: module
  - url: /local/custom_ui/layout-card.js
    type: js

name: Test
views:
  - id: 0
    title: Home
    panel: true
    cards:
      - type: custom:layout-card
        layout: vertical
        cards:
          - type: entities
            title: Receiver's
            entities:
              - remote.living_room
              - remote.downstairs
          - break
          - type: entities
            title: Forecast
            entities:
            - type: custom:weather-card
              entity_weather: weather.yweather
              entity_sun: sun.sun

this is my switches.yaml file in /includes folder, do i need to reference this in my ui-lovelace?

- platform: template
  switches:
    # Music activity Upstairs
    receiver_upstairs:
      friendly_name: "Receiver Upstairs"
      value_template: "{{ is_state_attr('remote.living_room', 'current_activity', 'Listen to Music') }}"
      turn_on:
        service: remote.turn_on
        data:
          entity_id: remote.living_room
          activity: '35877246'
      turn_off:
        service: remote.turn_on
        data:
          entity_id: remote.living_room
          activity: 'PowerOff'
    # Music activity
    receiver_downstairs:
      friendly_name: "Receiver Downstairs"
      value_template: "{{ is_state_attr('remote.downstairs', 'current_activity', 'Listen to Music') }}"
      turn_on:
        service: remote.turn_on
        data:
          entity_id: remote.downstairs
          activity: '35561135'
      turn_off:
        service: remote.turn_on
        data:
          entity_id: remote.downstairs
          activity: 'PowerOff'

Fixed it by adding the activity in the configuration.yaml file… however, how can i make it a toggle switch by turning it on with just a press?

This doesn’t seem to work

    cards:
      - type: entities
        title: Receiver's
        tap_action: toggle
        entities:
          - remote.living_room

change remote.living_room to switch.receiver_upstairs and it will turn on the activity.

Take a look at what I do:

1 Like

yep thank you, i changed it to a picture entity and the toggle action works now :slight_smile: mine is similar

do you have your config on github?

I do not. I’m going to be making major changes in the upcoming months and one thing on my list is to get my configuration up on GitHub with personal information removed. When that happens, I’ll add it to my profile.

1 Like