commit 456fcd2068cdaa102ec0a7ee146caa6f046af376 Author: Evelyn Alicke Date: Thu Mar 6 23:29:33 2025 +0100 stateful-scene-select diff --git a/stateful-scene-select.yaml b/stateful-scene-select.yaml new file mode 100644 index 0000000..5be611d --- /dev/null +++ b/stateful-scene-select.yaml @@ -0,0 +1,32 @@ +--- + +template: + select: + - name: "stateful scene selection" + icon: "mdi:state-machine" + state: >- + {{ integration_entities('stateful_scenes') + | reject('is_hidden_entity') + | reject('is_state', 'off') + | map('state_attr', 'friendly_name') + | list + | first + }} + options: >- + {{ integration_entities('stateful_scenes') + | reject('is_hidden_entity') + | map('state_attr', 'friendly_name') + | list + }} + select_option: + - action: switch.turn_on + metadata: {} + data: {} + target: + entity_id: >- + {{ integration_entities('stateful_scenes') + | reject('is_hidden_entity') + | select('is_state_attr', 'friendly_name', option) + | list + | first + }}