Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 102826

Stop automation after telegram callback

$
0
0

Hi!.

I want to receive an alert every last Tuesday of every month between 9 am and 9 pm via telegram every hour until I press a button on the telegram message to stop sending the message until next last Tuesday of the month.

I think I achieved everything except the part of sending the message every hour and the stop sending the messages when the telegram button is pressed. I’m totally blocked on how to achieve this from this point. Can someone help?

alias: Telegram bot automation repeat
description: ''
trigger:
  - platform: template
    value_template: >-
      {{ now().isoweekday() == 2 and now().month != (now() +
      timedelta(days=8)).month }}
condition:
  - condition: time
    after: '09:00:00'
    before: '21:00:00'
action:
  - service: telegram_bot.send_message
    data:
      title: '*TITLE*'
      message: Example message text
      target: -470985966
      inline_keyboard: Done:/done
  - wait_for_trigger:
      - platform: event
        event_type: telegram_callback
        event_data:
          data: /done
mode: single

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 102826

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>