Hi
Can someone please explain how to compare an extracted json value in template?
I have struggled with this and can´t get it right.
value_json.settaggi[5] contain 1 but when I try use it in logic I always get “Failed”
- platform: rest
resource: http://192.168.1.XX/jsondata.cgi
name: Mower Test
username: XXX
password: XXX
authetication: basic
headers:
User-agent: Home Assistant
Content-Type: application/json
unit_of_measurement: "h"
value_template: >
{% if 'value_json.settaggi[5]' | int == 1 %}
Charging
{% else %}
Fail
{% endif %}
Thanks!