Telegram_text options

Is there a way to have the “text” in the event_data of the ‘Telegram_text’ to accept multiple inputs? Like an OR condition? I do not like to use the Telegram command

The objective of doing this is to enable certain text to be processed for action

  trigger:
    platform: event
    event_type: telegram_text
    event_data:
      text: aircon off

This will trigger on all telegram text events:

  trigger:
    platform: event
    event_type: telegram_text

You can then use templates in your actions to determine which services to call.

e.g.

  actions:
    service_template: >
      {% if trigger.event.data.text == 'command 1' %}
        script.command_1
      {% elif trigger.event.data.text == 'command 2' %}
        script.command_2
      {% elif trigger.event.data.text == 'command 3' %}
        script.command_3
      {% else %}
        script.unknown_command
      {% endif %}

Alternatively if there are only a couple of events you want to trigger on:

  trigger:
  - platform: event
    event_type: telegram_text
    event_data:
      text: aircon off
  - platform: event
    event_type: telegram_text
    event_data:
      text: aircon on
  actions:
    service_template: >
      {% if trigger.event.data.text == 'aircon on' %}
        climate.turn_on
      {% elif trigger.event.data.text == 'aircon off' %}
        climate.turn_off
      {% endif %}
    entity_id: climate.your_aircon

thanks. However, I also used “conditions” to filter out the text. This way I need not worry about the text that are not expected

  trigger:
    platform: event
    event_type: telegram_text
  condition: 
    - condition: template
      value_template: > # Should return true or false
          {% if condition - put the logic like text starts with expected words %}
            true
          {% else %}
            false
          {% endif %}