I am quite new to this and I have got stuck at the coding part of Scripts (I think script is were i will do the code)
I have managed to make 2 remotes in the frontend to try the code and get my itach to send the commands for on/off to 2 of my devices just to see that i works and it does.
However I would like my alexa to be able to trigger these that will be filled with more commands for my entire home like, tv + stereo + etc
From what I understod the alexa can trigger scripts so this is were i intend to insert the code but I can´t seem to figure out how to write the code in order for that to work.
The remote is set upp like below in the bottom.
My question is if anyone here could help and guide me to how this should be written in scripts and how to get alexa to acces and trigger this command for on and off ?
Also if anyone can tell me how to trigger two different itachs in the same script (one have an rf transmitter that will be activated in some scenarios)
*Note
I don´t need to have infomration for current the state on / off because I will also use my system with irule and these are not intergrated with each other.
remote:
platform: itach
name: Living Room
host: 192.168.2.56
devices:
I’m not sure how you call a script from alexa. I don’t have one. Someone else may be able to help there.
To trigger two different itachs just add more -service: calls in the script sequence. The good thing about the remote component is it is only defined by the device name (and the redundant but required “entity_id”). You dont need to specify the itach at all. So make sure you have distinct device names across all your itachs!
e.g. these two different devices (lounge_tv and lounge_amp) could be on different itachs:
Thanks alot for the help !!! just from the look of it it seems like how i would want it to work. Been a busy day but I will definately complete and try it tommorrow
I tried using the code that you haneded me and inserted these in the scripts.yaml but I keep getting and error that won´t let hass start up.
The error is alsways the same and i can´t figure out what is causing it.
The error is
" mapping values are not allowed in this context at line 13 column 18" wich is directly after data template: in the second script.
Any idea on how to solve this ?
(also changed the name from amplifier to receiver in config.yaml)
Watch your indentation, it’s important. Also only one script declaration. The capitalised script names may be confusing later too. HA will change them to lower case, e.g script.receiver_input_tv will be how you call the last one.