I’m trying to send through hass agent to launch a powershell command to simulate multikey presses, but the command doesn’t activate. The reason I’m using powershell instead of the embedded multikey is that I’m using a variable through node red where the sendkeys change via environment variables. So in HASS the command field is blank, and node red does the work of assembling the below code with the multikey variable inside (whatever is inside the quotes inside the brackets of sendwait.)
The topic listener is working and I see it popping in the logs, but the actual function doesn’t run.
Add-Type -AssemblyName System.Windows.Forms; Add-Type -AssemblyName System.Drawing; [System.Windows.Forms.SendKeys]::SendWait("+(%{a})")