initial commit

This commit is contained in:
2025-02-07 12:46:24 -05:00
commit 8dfb36a3f1
183 changed files with 9212 additions and 0 deletions

View File

@ -0,0 +1,79 @@
---
#Unhandled update: Update(my_chat_member=ChatMemberUpdated(chat=Chat(api_kwargs={'all_members_are_administrators': True}, id=-4514608626, title='Reciepts', type=<ChatType.GROUP>), date=datetime.datetime(2024, 9, 29, 21, 24, 28, tzinfo=<UTC>), from_user=User(first_name='Alexander', id=67239746, is_bot=False, language_code='en', last_name='Savin', username='alex_savin'), new_chat_member=ChatMemberMember(status=<ChatMemberStatus.MEMBER>, user=User(first_name='Home Assistant', id=503378800, is_bot=True, username='home_assistant_savin_bot')), old_chat_member=ChatMemberLeft(status=<ChatMemberStatus.LEFT>, user=User(first_name='Home Assistant', id=503378800, is_bot=True, username='home_assistant_savin_bot'))), update_id=211080293)
#Unhandled update: Update(my_chat_member=ChatMemberUpdated(chat=Chat(id=-1002373778311, title='Reciepts', type=<ChatType.SUPERGROUP>), date=datetime.datetime(2024, 9, 29, 21, 25, 14, tzinfo=<UTC>), from_user=User(first_name='Alexander', id=67239746, is_bot=False, language_code='en', last_name='Savin', username='alex_savin'), new_chat_member=ChatMemberMember(status=<ChatMemberStatus.MEMBER>, user=User(first_name='Home Assistant', id=503378800, is_bot=True, username='home_assistant_savin_bot')), old_chat_member=ChatMemberLeft(status=<ChatMemberStatus.LEFT>, user=User(first_name='Home Assistant', id=503378800, is_bot=True, username='home_assistant_savin_bot'))), update_id=211080294)
#Unhandled update: Update(my_chat_member=ChatMemberUpdated(chat=Chat(id=-1002373778311, title='Reciepts', type=<ChatType.SUPERGROUP>), date=datetime.datetime(2024, 9, 29, 21, 25, 14, tzinfo=<UTC>), from_user=User(first_name='Alexander', id=67239746, is_bot=False, language_code='en', last_name='Savin', username='alex_savin'), new_chat_member=ChatMemberAdministrator(api_kwargs={'can_manage_voice_chats': True}, can_be_edited=False, can_change_info=True, can_delete_messages=True, can_delete_stories=True, can_edit_stories=True, can_invite_users=False, can_manage_chat=True, can_manage_topics=True, can_manage_video_chats=True, can_pin_messages=True, can_post_stories=True, can_promote_members=False, can_restrict_members=False, is_anonymous=False, status=<ChatMemberStatus.ADMINISTRATOR>, user=User(first_name='Home Assistant', id=503378800, is_bot=True, username='home_assistant_savin_bot')), old_chat_member=ChatMemberMember(status=<ChatMemberStatus.MEMBER>, user=User(first_name='Home Assistant', id=503378800, is_bot=True, username='home_assistant_savin_bot'))), update_id=211080297)
#- alias: 'Telegram bot turn on lamp'
# trigger:
# platform: event
# event_type: telegram_command
# event_data:
# command: '/lamp-on'
# action:
# service: light.turn_on
# entity_id: light.treelamp
- alias: 'Telegram bot boil kettle'
trigger:
platform: event
event_type: telegram_text
event_data:
text: 'boil the kettle'
action:
- service: telegram_bot.send_message
data_template:
target: '{{ trigger.event.data.chat_id }}'
message: 'Ok {{ trigger.event.data["from_first"] }}, boiling the kettle!'
#- alias: '[App] Telegram image'
# trigger:
# platform: event
# event_type: telegram_sent
# action:
# - service: notify.telegram_alex
# data_template:
# message: 'Got an image'
- id: 'telegramtestcallback'
alias: 'Telegram callback to test notifications'
trigger:
platform: event
event_type: telegram_command
event_data:
command: '/testme'
action:
- event: test_telegram_bot_notify
- id: 'telegramtesttrigger'
alias: 'Telegram bot test sequence'
trigger:
- platform: event
event_type: test_telegram_bot_notify
condition: []
action:
- service: notify.telegram_alex
data_template:
title: "From Home-Assistant:"
message: "The is a test of the laundry notification system.\nChoose a notification to test:"
data:
inline_keyboard:
- 'Dryer:/testdryer, Washer:/testwasher'
- 'Cancel:/removekeyboard'
- id: 'telegramremoveinline'
alias: 'Telegram callback to remove keyboard'
trigger:
platform: event
event_type: telegram_callback
event_data:
data: '/removekeyboard'
action:
- service: telegram_bot.answer_callback_query
data_template:
callback_query_id: '{{ trigger.event.data.id }}'
message: 'OK, dismissing notification'
- service: telegram_bot.edit_replymarkup
data_template:
message_id: '{{ trigger.event.data.message.message_id }}'
chat_id: '{{ trigger.event.data.chat_id }}'
inline_keyboard: []