Mysensors binary switch

Hi guys,

I’ve been searching all day but can’t find the answer. I have built a binary switch, arduino nano and radio, and everything is working fine. My little problem is that I get the result in 1 | 0 and I kind of need it in ON | OFF instead.

Is there a simple way to do this?

Cheers

Maybe you can do something like this…

my_new_switch:
value_template: ‘{% if is_state(“binary_switch.bin_switch”, “1”) %}on{% else %}off{% endif %}’
friendly_name: ‘New_bin_switch’

If you’re using the mysensors component, binary values should already be converted to STATE_ON/STATE_OFF ie on/off. Can you give a bit more info on your setup, type of gateway and mysensors config?