From 456fcd2068cdaa102ec0a7ee146caa6f046af376 Mon Sep 17 00:00:00 2001 From: Evelyn Alicke Date: Thu, 6 Mar 2025 23:29:33 +0100 Subject: [PATCH] stateful-scene-select --- stateful-scene-select.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 stateful-scene-select.yaml 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 + }}