Setting Harmony activity through AppDaemon

I’m trying to set the harmony activity through using python and I cannot get it to work. This is what I have tried:

self.call_service(“remote/turn_on”, entity_id = “remote/living_room”, activity = “TV”) #activity name

self.call_service(“remote/turn_on”, entity_id = “remote/living_room”, activity = “30947237”) #activity id

self.set_state(“remote.living_room”, current_activity = “TV”)

self.turn_on(“remote.living_room”, activity = “TV”)

None of these work. I’m basing these lines off this automation architecture:

  action:
    service: remote.turn_on
    data:
      entity_id: remote.living_room
      activity: 'TV'

I’m not sure if i’m doing it correctly, does anyone have some incite?

how does your app look?
and do you get errors and what kind?
in the appdaemon logfiles and in the HA logfiles.

I ended up getting it working.

self.turn_on("remote.livinig_room", activity = "TV") 

was the correct way to do it. It was working, but I had my old automations in the background interfering with the activities I was testing. I thought I turned them all off.

2 Likes