How can I use the telegram command payload in the action. Here: In Telegram I send the delay to be set as /<delay in minutes>
. I wrote automations for specific values. How to allow any value in the command and use it in the action?
- id: '234987446085'
alias: telegram turn on pump after 30 minutes
trigger:
- platform: event
event_type: telegram_command
event_data:
command: /30
condition: []
action:
- wait_for_trigger: []
timeout:
hours: 0
minutes: 30
seconds: 0
milliseconds: 0
- service: switch.turn_on
data: {}
target:
entity_id: switch.pump
mode: single