Oh guys, HoAss is really complicated…
I guess I am understanding finally. At least partially.
So both of the following should work without issues:
value_template: '{% if value_json.relais.r_wp == true %} 1 {% else %} 0 {% endif %}'
value_template: '{{ value_json.status.daemon | abs }}'
Finally…