I’m still trying to create a universal remote control. I’m progressing quite well but got stuck today with an Unexpected token in JSON error.
Basically, I want the power-on button to go from blue to grey based on the state of the television (blue if the TV is on and grey for off). Secondly, the command of the button card needs to be power_off (in case the tv is on) and power_on when it is off.
Here is my code
I can’t see where the JSON error would be coming from. Is it from your original post? Does your debug console in your browser indicate that the problem is in that section and does it tell you which token is the problematic one?
As an alternative, how about using the button card’s state options to display the card correctly and then just use media player.toggle?
I want on the top, when you push for example FireTV that it not only switches to the FireTV remote (using switch card) for that but also that a command is being send to the LG to change the HDMI. Or when the TV isn’t on yet, when i press LG, that the powerOn command is getting done.
I’ve been messing around with the input_select but don’t find enough information to be able to do this.
@RomRider Thank you for building these amazing button cards. I got the automations done in NodeRed with some help from the community and my universal remote control is almost finished. I couldn’t have done this without your hard work on the custom button cards.
I apologise if this is classed as cross-posting, I hadn’t realised until now that this had a thread of its own.
Im stuck pretty much at the start.
I used HACS to install, no problems. I added the resource in the Lovelace dashboards/Resources tab.
Then in the UI, I paste a simple button from the instructions using the ‘Raw configuration editor’ and get this in the UI when I save and exit the editor:
As far as I understand I do not need to do anything in ui-lovelace.yaml as I’m doing it all in the UI…but perhaps I’ve totally misunderstood - happy to be told that this is the case!