Use Select selector for conditions

Hi!

Within a blueprint I would like to use the select selector for a condition in the action part. Can someone please point me out whats the reason why I can’t get a ‘true’ response for the condition ‘template’ when I trigger the automation?

Input

  input:
    taster01_action:
      name: Taster 01 - Action
      description: Auswahl der auszuführenden Aktion in Abhängigkeit des gewählten Ziels
      selector:
        select:
          options:
            - Media Player Control
            - Shutter Control
            - Light Control
            - Button Deactivated
          mode: dropdown

(‘Light Control’ is choosen in the blueprint dialogue)

Action

action:
  - choose:
      # TASTER01
      - conditions:
          condition: and
          conditions:
            - condition: template
              value_template: "{{ is_state('taster01_action' , 'Light Control') }}"
            - condition: trigger
              id: switch
        sequence:
          - service: light.toggle
            target:
              entity_id: !input taster01_target

As I can see in the traces the condition ‘trigger’ works but not the condition ‘template’ as it always returns a ‘false’.

Thanks in advance!
Thomas

Thread can be considered as closed - I figured out how to use the right syntax which is:

      - conditions:
          condition: template
          value_template: "{{ taster01_action == 'Light Control' }}"

Cheers,
Thomas

1 Like