Hi,
I’m creating a blueprint which helps me to create multiple, easy to use, script for dynamic light scenes.
I want to create a script for multiple lights, which then loops a part of the sequence and each loop selects a random entity from the selected entities in the blueprint.
Selecting multiple items is easy, as I can easily set the code to allow for it:
input:
target_light:
name: Lights
description: The light that you want to have switched
selector:
entity:
domain: light
multiple: true
However, selecting a random entity from the list provided is where I get stuck. When manually creating the script, I would use below code:
target:
entity_id: light.{{["ki_afzuigkap_l","ki_afzuigkap_r","ki_cupboard","ki_strip"]|random}}
It would be nice if these 4 entities can be selected in the blueprint and a random entity can then be taken while looping the script.
I’d rather not create a group for each light group, because they are not always linked. It’s not always the kitchen lights, or the living room lights, but can also be a combination of many more zones/rooms. The amount of groups would sort of defy the reason for creating a blueprint in the first place.
Hope anyone has got a good idea. I couldn’t find any example over the past weekend.