Hi,
I want to send and ir command, using an IR device in an Advanced Flow. In the card you can use ‘send command’ for an IR Device but it seems you can only select from a list (pop-up) with the commands for that device. However I need to pass the command from the previous card (Tag).
Any way to do this, or alternative, trigger an IR Device command (and specify which one) from a script?
PS> so not looking to use send pronto Hex (know I can do that), but a command from an existing IR Device…
Sure, thanks (Changed the language to English first 
The Flow is started with a Tag (eg ‘Cursor Down’) and depending on the “VideoSource” there is a Script triggered that maps the command naming to the device IR command name (in an IRCommand Tag from the script) which I wanted to pass to the Device, in this case an AppleTV, to select the IR Command to send. However I can only select from the pop-up and there does not seem to be an option to use the tag which is passed on (eg. ‘Cursor Down’).
So looking for a wat to use the ‘Send command’ for an (IR) Device, using a Tag (String) to select which command. Either from a flow or Script…
Hope it makes sense.
Any suggestion is welcome…
Thanks, J.
For now I’ve come up with the following work-around which seems to work:
/*
* In this script sets a Capability Value on a device with <name>
*/
async function turnCapabilityOnforDevice(strDeviceName,strDeviceCap) {
// Get all devices
const devices = await Homey.devices.getDevices();
// Loop over all devices
for (const device of Object.values(devices)) {
// log(device.name);
// log(device.class);
// log(device.capabilities);
if (device.name === strDeviceName) {
log(device.name);
log(device.capabilities);
// set Device value
await device.setCapabilityValue(strDeviceCap, true)
.then(() => log('OK'))
.catch(error => log(`Error:`, error));
}
}
}
turnCapabilityOnforDevice('Apple TV Gen 4','button.cursor_down');```
You lost me completely, solly 