Help with blueprint condition for calendar-trigger

Im trying to make a blueprint for calendar-events as triggers.
The most of code is working well, but i`m always struggling wit the condition.

I want to compare a keyword as in put with the calendar_event.summary. After hours i tried a little test-automation with basic functions.

Error
Error: In 'template' condition: TypeError: 'in <string>' requires string as left operand, not LoggingUndefined

Test automation code

alias: test cal
description: ""
trigger:
  - platform: calendar
    event: start
    offset: "00:00:00"
    entity_id: calendar.mkhrsch
condition:
  - condition: template
    value_template: "{{ keyword in trigger.calendar_event.summary }}"
action:
  - type: turn_on
    entity_id: light.fensterlampe_vorn
    domain: light
  - service: notify.notify
    data:
      message: match
      title: "{{trigger.calendar_event.summary }}"
variables:
  entities: keyword = "test"
mode: single

How i have to form the condition expression to use variables or !input elements?

In blueprint i want to use

input
    keyword:
      name: Keyword
      selector:
        text:

Thx for your time and advices…hope I did not forgot any facts.

variables:
  kw: !input keyword
condition:
  - condition: template
    value_template: "{{ kw in trigger.calendar_event.summary }}"

1 Like