[lists]
Itās still working as it ever did, but Iāve realised that it behaves differently to those attributes that are lists, e.g. if you take the openweather weather entity, the forecast attribute is a list:
{{state_attr('weather.openweathermap','forecast')}}
gives you a list like
[
{
"datetime": "2022-04-14T11:00:00+00:00",
"precipitation": 0.14,
"precipitation_probability": 34,
"pressure": 1017,
"wind_speed": 3.94,
"wind_bearing": 349,
"condition": "rainy",
"clouds": 61,
"temperature": 20.5,
"templow": 8.1
},
...
Now if I try to add an index like [1] into the template, I get the whole element in {}.
I am trying to achieve something similar with multiscrape ā select a list which I could reference by using an index in a template, but this doesnāt seem to work that way. When I use the following template in multiscrape:
attributes:
- name: "Forecast Time"
select_list: ".day-hour-ext.flex-column .day-hour-time"
value_template: "{{(value.split(','))|list}}"
The attribute I get is a string, with carriage returns but not a list
{{state_attr('sensor.inpo_praha_temperature','forecast_time')}}
Looks as if it were a list
[
"18:00",
"19:00",
"20:00",
"21:00",
...
]
If I try to reference an element by an index, e.g. [1], I get a single character but not the whole element ā19:00ā.