Milor
(Milor)
1
- platform: rest
resource: "https://192.168.1.3/Cashdro3WS..."
name: Cashdro7
value_template: "{{ value_json.data[0]['LevelRecycler'] }}"
verify_ssl: false
I can only get one value and I want to get it out of the entire array, it has a size of 15.
I’ve been trying for weeks and I guess there’s something I don’t know.
I want the LevelRecycler of each one and give it a name.
Note: It would be a bit crappy to make 15 calls…
You can make 1 call and create 15 sensors using restful integration
RESTful - Home Assistant (home-assistant.io)
EDIT: if you want to use this in graphs then I’d recommend to load all as a attribute in 1 sensor and run a graph like apexcharts on top of it
Milor
(Milor)
3
That’s the idea… but no matter how many tests I did, I only managed to get an error and not show any.
How do I indicate the rest of the sensors?
I understand that I should use:
"{{ value_json.data[1]['LevelRecycler'] }}"
"{{ value_json.data[2]['LevelRecycler'] }}"
....
"{{ value_json.data[15]['LevelRecycler'] }}"
But where do I add it? How do I tell you the name?
I tried looking at the examples but after weeks I didn’t get it… Can anyone give me a clue?
As per the doc/link I sent
rest:
- authentication: basic
resource: "https://192.168.1.3/Cashdro3WS..."
verify_ssl: false
sensor:
- name: "S1orwhateveryoulike"
value_template: "{{ value_json.data[0]['LevelRecycler'] }}"
- name: "S2"
value_template: "{{ value_json.data[1]['LevelRecycler'] }}"
1 Like