I have this UFO-R11 infrared blaster which works fine, when I send a code directly in devices → manage zigbee device
cluster: “ZosungIRControl (Endpoint id: 1, Id: 0xe004, Type: in)”
commands: “IRSend (id: 0x0002)”
→ can control my 2 remote controlled ceiling lights at once
So I thought I create a script in config/scripts.yaml and a template light.
verify the action name in settings → developer tools → actions is correct. Select the script action, then swap to yaml mode to see the name of the action.
Ok, I am using your version now and when toggling the light I get:
Failed to perform the action light/turn_on. expected dict for dictionary value @ data[‘params’]
I changed it to a dictionary because the error message when toggling was Failed to perform the action light/turn_on. expected dict for dictionary value @ data[‘params’]
I’m not 100% sure what the script needs to look like, this is how I send codes successfully:
Based on what you have shared and what a few older posts show, it does look like it should be a dictionary. I thought it had been fixed, but I have a vague memory of there being an issue with using templates for sub-properties in action calls…
So, if the following doesn’t work:
service: zha.issue_zigbee_cluster_command
data:
ieee: XX:XX:XX:XX:XX:XX:XX:XX (address like in the UI)
endpoint_id: 1
cluster_id: 57348
cluster_type: in
command: 2
command_type: server
params:
code: "{{ code }}"
Try templating params completely:
service: zha.issue_zigbee_cluster_command
data:
ieee: XX:XX:XX:XX:XX:XX:XX:XX (address like in the UI)
endpoint_id: 1
cluster_id: 57348
cluster_type: in
command: 2
command_type: server
params: "{{ {'code': code} }}"
Try the action directly in the Action tool without the templating so that you know what works in script syntax.