@i00 wrote:
I have a rest sensor that contains attributes like the following:
{% set test = {'data': [ {'name': 'prx', 'value':24}, {'name': 'blob', 'value':'0x27eac'} ] } %} Value: {{ test.data.0.value }}
The issue I have is that the prx and blob parts switch depending on what was last updated on the hardware … so what I want to do is instead of using:
{{ test.data.0.value }}
do something like:
{{ test.data.[‘name’:‘prx’].0.value }}
(I use .0. in the line above as in theory [‘name’:‘prx’] could return multiple)Is this possible?
Thanks in advance!
Posts: 1
Participants: 1