Difficulty with V_IR_SEND with HA and MySensors

Hi all,

I’ve been poring over everything I can find to try to figure out what I’m doing wrong here, but can’t seem to figure it out

I’m trying to send data from HA to my MySensors node when a switch toggles. I’m trying to use the switch.mysensors_send_ir_code service, but can’t seem to figure out how to set it up properly to actually send the data.

Here’s what I’ve tried in my config:

automation:
 alias: test send ir code
 trigger:
    platform: state
    entity_id: switch.relay__button_3_3
  action:
    - service: switch.mysensors_send_ir_code
      data:
        V_IR_SEND: '0xC284'
      entity_id: switch.relay__button_3_3

However, that doesn’t seem to work (I don’t get anything in the receive() handler on my node, and I don’t see anything go out onto the MQTT message bus). It doesn’t work if I toggle the switch (switch.relay__button_3_3) or if I manually toggle the automation in the UI.

Any ideas on what I’m doing wrong here?

Also, I can’t quite figure out the right JSON format to try this manually through the developer tools. I’ve tried a few combinations but have not yet found the one that works, and I haven’t been able to find an example format when I’ve searched.

Thanks in advance!

This is the JSON you would use in dev tools:

{"entity_id": "switch.relay__button_3_3", "V_IR_SEND": "0xC284"}

Are you sure you got the correct entity_id for your switch? Double underscore seems a bit weird.

Regarding your automation, your indentation is off in a couple of places. Maybe happened when you pasted it here?

1 Like