it shouldnt be send as a string at all.
but i think you are right and there needs to be a change in the call_service from python.
in the widgets the data should be stringified like this
JSON.stringify(arr)
and in the call_service it should be translated to dicts with
json.loads(json_string)
or something like that. but i dont know the total impact from that, so i need to take that up with andrew.
ill open a new issue to sort that out.
off course you could also do it on the HA side.
create scripts for all command combinations you like and call those scripts from the dashboard.
You may grab the changed rundash.py file here. And the new version of the remote widget here. Take a look on the sample “Remote.dash” file as the way to list the commands changed a bit.
I’m attempting to implement this widget but I seem to be having trouble. Where does the rundash.py go?
When I try to implement a test control to talk to a Harmony remote, I’m getting the following error when the dash loads:
test_livingroom_volume_down: Error in widget definition ‘%s’:
test_livingroom_volume_down: parser says
test_livingroom_volume_down: in “”, line 2, column 10: entity: {{entity}} ^
test_livingroom_volume_down: found unhashable key while constructing a mapping
This is the widget implementation:
widget_type: remote
title: test
entity: remote.livingroom_harmony_hub
command:
- VolumeDown
I’m working on a dashboard for controlling my home theater. I’ve successfully implemented calling scripts to adjust the volume or change channels, but executing the scripts leads to a slow user experience (push button, run script, wait for button to reset so it can be pushed again). I’ve worked around this but adding repeats for the volume, but that wont work for changing channels or when I recreate a directional pad in the dashboard.
What I’ve found is that by using the Developer -> Services remote.send_command tool, I can execute a repeated command quickly with little to no delay. I was hoping to use this widget to do just that, but I’m getting that error.
i dont know.
HA has changed so much in 2 years that i cant be sure of anything.
im only supporting old topics (that i reacted on) on the forum, for everything else im available on the AD discord channel.
i didnt see any other simular widgets come by on discord, but that doesnt mean they are not there.
clyra just hacked the switch widget by changing the yaml, so the same thing was possible without a custom widget as well.
by the way, i have no clue what he tried to do with rundash.py
seems like a try to run dashboard without appdaemon.
I’ve been looking for a solution for a few days. This seems to come close enough, looks like I need to update the JS to include an arg for the harmony device.
Is there a particular way to format the entity_id in order to include the service data like device and command? I gave it a shot below but I ended up turning the receiver off
kind late, but… the remote still works, but as you figured out it need quotes in a few places. I thought i did committed the changes to my repo but now i’m sure i didnt. sorry :(. Here is the full remote.yaml after the update:
I dont know where you got the run_dash.py, but it is not needed. I did a few a changes a long time ago, but they are not needed anymore. And here is a button using the remote: