Hi all,
I would like to get a list/array of Radio station names. When I make the rest call in Postman, the json response looks like this:
[
{
"order": 0,
"id": "6336061628069729",
"title": "DR P1",
"slogan": "DR P1 er DR's første radiokanal",
"description": "DR P1 er DR's første radiokanal, hvis historie går helt tilbage til 1925, hvor DR begyndte sin virksomhed. P1 er en ren talekanal med fokus på oplysning; nyheder og dokumentar samt debat-, kultur-, videnskab- og samfundsprogrammer.",
"popularity": 30458,
"country": "Denmark",
"language": "Danish",
"images": {
"64x64": "http://static.airable.io/64/02/797233.png",
"128x128": "http://static.airable.io/82/44/246012.png",
"256x256": "http://static.airable.io/45/45/402641.png",
"512x512": "http://static.airable.io/14/37/146822.png",
"1024x1024": "http://static.airable.io/84/05/782897.png"
},
"isAvailable": true,
"lossless": false,
"isCustomStation": false
},
{
"order": 1,
"id": "5207345892675221",
"title": "DR P6 BEAT",
"slogan": "",
"description": "DR P6 BEAT er for de nysgerrige, der gerne vil overraskes. Det er til dem, der gerne vil have mere at vide og gå med bagom musikken. P6 BEAT favner de alternative strømninger - både i den udfordrende og fornyende undergrundsmusik og i mere populære genrer.",
"popularity": 10902,
"country": "Denmark",
"language": "Danish",
"images": {
"64x64": "http://static.airable.io/41/03/687570.png",
"128x128": "http://static.airable.io/69/12/658941.png",
"256x256": "http://static.airable.io/78/82/218449.png",
"512x512": "http://static.airable.io/32/27/546736.png"
},
"isAvailable": true,
"lossless": false,
"isCustomStation": false
},
{
"order": 2,
"id": "2972408424131572",
"title": "BBC Radio 2",
"slogan": "Radio 2 - There's more 2 it!",
"description": "The home of great music - Pop and Rock from the sixties, seventies, eighties and beyond to blues, big band, country and jazz with the best live music and documentaries.",
"popularity": 47886,
"country": "United Kingdom",
"language": "English",
"images": {
"64x64": "http://static.airable.io/35/81/161765.png",
"128x128": "http://static.airable.io/09/38/859737.png",
"256x256": "http://static.airable.io/45/89/593079.png",
"512x512": "http://static.airable.io/54/78/274723.png",
"1024x1024": "http://static.airable.io/54/42/509775.png"
},
"isAvailable": true,
"lossless": false,
"isCustomStation": false
}
]
I’ve created this entity:
rest:
- resource: https://cloud.bang-olufsen.com/api/v1/netradio/favorites
verify_ssl: false
headers:
Authorization: Bearer <token>
Content-Type: application/json
scan_interval: 360
timeout: 30
sensor:
- name: "Beoradio favourites"
value_template: "{{ now() }}"
json_attributes:
- title
But all I get is this:
I only get the title of the first item in the array. I would like it to be an array that I can pass on to a input_select entity using the input_select.set_options call.
I’ve tried many things without luck, so now I’m hoping for some guidance here. Thanks in advance!