I think that’s complaining about the template that creates the alle
variable. That’s surprising (to me) because your original version references the current_position
attribute of each one of the ten cover
entities. Anyway, that’s the part I could not test on my system because I don’t have ten covers (only one cover and it doesn’t report its position as a percentage).
As an experiment, copy-paste this into the Template Editor. It should produce a list of ten numbers where each number represents a cover’s current_position
.
{% set alle = expand(
'cover.master_bedroom', 'cover.voorraam_klein', 'cover.voorraam_groot',
'cover.computer_kamer', 'cover.hal_1e_etage', 'cover.zijraam',
'cover.badkamer', 'cover.logeerkamer', 'cover.achterdeur', 'cover.achterraam')
| selectattr('attributes.current_position', 'defined')
| map(attribute='current_position') | map('int', 0) | list %}
{{ alle }}
It’s nearly identical to what you already tried but it also contains this line which only selects covers that have the current_position
attribute defined.
| selectattr('attributes.current_position', 'defined')
If it fails to produce a list of ten numbers then I’m not sure what’s the reason.