How to access field of returned answer? #12
Closed
timkolloch
started this conversation in
General
Replies: 2 comments 1 reply
-
I managed to do it like that:
But I still do not get what the difference between |
Beta Was this translation helpful? Give feedback.
0 replies
-
@tiko2302 Answered in this thread ... "You’re basically creating a Python dictionary, and a Python dictionary has a method named items". Here's an example I tested in the HA Template editor:
results:
Hope it helps! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Good evening!
I get following return from my call to the search playlist service:
My goal is to pass the
uri
portion to the Play context service so that a playlist I previously searched for can be played.In order to do that I need to pass it to the next service.
My current "implementation" for the second service call is this:
but I get the error
Error rendering data template: UndefinedError: builtin_function_or_method object has no element 0
.I tried googling for a solution but all I found was people saying that it should work like that or as another solution use
{{retrieved_playlist.result.items.0.uri}}
which does not work either.What am I doing wrong?
Best wishes,
Tim
Beta Was this translation helpful? Give feedback.
All reactions