@Tintolo wrote:
Hi all !
I’m trying to get a simple value in a simple JSON with the RestFul Sensor …
but result is always “unknown” …What am I doing wrong ?
My JSON :
{ "option_tarifaire" : 1, "tarif_courant" : 2, "isousc" : 60, "conso_base" : 0, "conso_hc" : 000852348, "conso_hp" : 001683809, "conso_hc_b" : 0, "conso_hp_b" : 0, "conso_hc_w" : 0, "conso_hp_w" : 0, "conso_hc_r" : 0, "conso_hp_r" : 0 }
My configuration.yaml :
sensor: - platform: rest resource: http://192.168.1.42/data.json name: conso_hc value_template: '{{ value_json.conso_hc }}'
The URL is OK with curl in Putty …
The RestFul Sensor example with external IP works fine …Does the URL *.json the problem ?
Thanks for your help,
Posts: 12
Participants: 4