Harmony Activities, Volume Slider, and Lovelace

Here is the harmony config, images only show for “PowerOff”

{
    "Activities": {
        "-1": "PowerOff",
        "44549769": "Watch Apple TV",
        "44549790": "Tanners PS4",
        "44550360": "Marshalls PS4"

ok, that looks good. Have you cleared the cache? CTRL+F5 in your browser.

yes,here is my directory, I cant think of much else.

that seems suspect. Change it to lowercase.

was thinking that could be it… will change the hub name and get back to you.

Thank you! I should have known because I initially named my switches with uppercase letters but had to change them to lowercase, thanks again I am new to this yaml thing haha.

Capture

1 Like

hey petro and all

i kinda feel like im barging in to this mature harmony discussion with my baby-steps and dippers… but this looks like the right place to get some basic answers to enlight my poor knowledge.

im new to HA. so far i got my philips hue to work, my sonoff switches to work, and my 2 harmony hubs listed.
currently they look like shown in the pic, and the switch is linked to activities that works if i flip it.

i couldn’t figure out how to implement the code samples in the thread into my dashboard as buttons, or anything else for that matter. i can understand that its due to my lack of understanding…

my configuration.yaml file is pretty empty.
i played around a bit with the lovelace interface a little, made a snapshot just in case, but that’s pretty much it…

I’d love any help to point me in any right direction :slight_smile:

I’d start with the post going top down and skip everything related to the receiver. Template switches will give you toggle buttons. You’ll also need to understand how the configuration file is broken up and how you add integrations through yaml.

1 Like

@petro Nice work! I’m curious about one thing though. I have a Harmony remote already configured through HA and it lists the activities as entities. The receiver I have is an old Denon AVR without IP and thus not supported. I’m not understanding the point of your Yamaha integration. Wouldn’t all of what you did work fine just using the harmony integration? What functionality might I miss? Maybe its time for a new receiver :smile:

The Yamaha integration works 100% better than harmony. It actually reports a volume level where harmony does not. The media_player it creates has way more functionality as well.

1 Like

Thanks, I will simply have to tell the wife we need a new receiver!

I’ve followed this tutorial and love it, @petro! It’s almost all working on my end, except the volume slider.

I’ve modified the volume sliders a bit since I also have an Onkyo with a scale of 0-60 for volume, following what @Tom_996 did here. However, I’m getting an error when I trace my automation:

Error: Error rendering data template: UndefinedError: 'dict object' has no attribute 'to_state'

Here’s the automation I have set up in configuration.yaml:

- id: "1647099210189"
  alias: Living Room Onkyo Volume (Media to Slider)
  trigger:
    - platform: state
      entity_id: media_player.living_room_receiver
  action:
    service: input_number.set_value
    data_template:
      entity_id: input_number.living_room_receiver
      value: >
        {{ ( trigger.to_state.attributes.volume_level | float ) / 0.01566667 }}

I’ve set up my Onkyo receiver via DLNA integration rather than directly, in case that changes anything.

Am I doing something wrong here? Thanks in advance!

You can’t use the play button on the automation to test it, you actually have to adjust the volume on the media player.

ah ok. thanks!

what i’ve noticed looking at this some more is that when i adjust the volume slider on the Device (via DLNA integration) it changes the volume on the receiver. but if I change the volume on the receiver, that slider doesn’t move. I feel like if that’s not working, then there’s no way this automation is going to work either, right?

after testing on the slider I can get it to change volume and matches the numbers on the receiver…so problem solved there… just can’t get changes on the receiver to update home assistant. any ideas?

does your receiver report volume levels? If no, it’s not possible

I have an Onkyo TX-NR636 - it seems to report them on start up, but hard to tell if/when it’s updating them. anyway to figure this out? is the DLNA integration not the best choice here and should I instead go with the direct integration although I tried this earlier and struggled with it.

Unfortunately, I know nothing about that hardware. It’ll just be trial and error on your end. That onkyo integration looks very easy to set up. What problems did you have?

Ok, thanks for the other help!

I’m not sure what I was doing wrong before…but I tried setting it up when I first started with HA so I didn’t really have a clue what I was doing. I just tried again and it seems to connect. I’ll play around and see if I can get the volume controls working through it. Wish me luck!

So out of interest, what method have you used now that Template Switch is deprecated?
(2024.7)

Template switches are not deprecated.