Thanks for posting that, Tom! When I saw that you also have an NR626 and had switched the divide and multiplication between the two automations, I had hoped that was my issue. Unfortunately, I still get a negative feedback loop that I don’t understand.
I’ve even pulled out all of my volume control and monitoring portions of my Lovelace cards on the off chance that I had created something bad there, but it still exists, so I just don’t know where else it could be coming from…
Maybe one of these months I’ll track it down.
Thanks!
Hmmm… I just noticed this in my logs. I don’t know what this means.
Onkyo Volume (Slider to Media): Error executing script. Invalid data for call_service at pos 1: value must be at most 1 for dictionary value @ data['volume_level']
Successfully saved
Edit- Does anybody know how to look at the code the built in Onkyo media player uses? The volume slider there functions perfectly bidirectional.
I managed to get my Harmony activities working, thanks to petro and his thread here, but now I cannot figure out how to add more actions to those switches, or how should I approach this. For example, my Harmony activity switch that turns on TV and Nvidia Shield is like this (based on petro’s switch):
My TV is plugged in Sonoff S20 plug, so I have power off when TV is not in use. So, I would like to add a sequence that when “Shield+TV” -activivity switch is pressed in HA UI, it first turns on switch.sonoffs202 , then 0,5 second delay, and then start the activity. Same thing, when activity is turned off, sonoff is also powered off in the end, after suitable delay.
Also, I would like to check if some device is in use in the next activity I am switching in to, so that I don’t have to switch sonoffs off and on all the time. For example, if I switch from Shield+TV to Blu-Ray+TV, then sonoffs202 switch stays on, but if I switch from Shield+TV to BluRay+Projector, then it switches off sonoffs202 (and naturally switches on other needed sonoffs).
What would be the easiest solution for adding these extra sequences in the switch in your opinion?
if you want that, you need to make a separate script that turns on the sonoff202 with a condition at the start. The condition checks to see if the sonoff is off. Then have the turnon, and delay.
Thank you! Turns out I had written pretty much the same code already, but did not have “-” characters in front of services and delays, but now that I think of it, of course, that’s how it works As in your original code, there was only one service, and now in this, there are several. That’s one PITA thing in Home Assistant: even the slightest error in syntax just return some error message where you need to guess if your code is wrong, or is it basically just the syntax…
But now it works, and based on your example, I naturally did the same thing with turn_off service: first turn off the activity, then delay, then switch off sonoff
Hmm. So in this case, I would need to approach these activities different way, not as separate on-off switches, but separate buttons that only start the activity (with suitable sonoffs) when pressed, and also check if those sonoffs that belong to that activity are already switched on, right? And then one button (maybe called “End current activity” that just turns off everything, including sonoffs. I could send all possible PowerOffs and switch all sonoffs off as well with that one button. Could that work?
Yah, there’s a number of ways to do this. You could even write a single script to handle this and just pass a different entity_id to it. In 0.113, scripts can run concurrently so it will always work properly. Personally, I’d go that route. 2 scripts, 1 for on, 1 for off.
EDIT: There’s also going to be a number of other changes too. Like a choose option. So you may be able to do this with 2 total scripts and pass in the activity and switch entity.
It’ll be in the release which should be wednesday. I don’t know the current syntax because it’s changed so many times. We’ll have to wait til the docs are updated, which should also be wednesday.
I have got switches to work for start activities but how do I control the devices? I would like to get an D-Pad and home buttons etc. Anyone got any lovelace UI that I can get inspiration from.
That’s a rabbit hole. Basically, you need to make a script for each d-pad direction. The script itself will have a template that properly places the correct device id based on the current activity. I made an appdaemon app to do this for me, but I haven’t released it to the public because it’s rather complicated to set up.
Yes that will be a lot of scripts since a remote use many buttons. Can you just show a script for 2 buttons on a device? I would probably figure out the rest after that.
Hey Petro, thanks for your patience on this matter, maybe you can help one more person haha, here is my issue, the picture will load in the off state but not for when an activity is actually on. Any ideas?
Would only let me post one photo, I’m positive my directories are correct because it is working for the off image