daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Mar 21st, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - alias: 'TG post'
  2.   hide_entity: true
  3.   trigger:
  4.     - platform: event
  5.       event_type: telegram_text
  6.     - platform: event
  7.       event_type: telegram_callback
  8.       event_data:
  9.         data: '/почта'
  10.   condition:
  11.     - condition: or
  12.       conditions:
  13.         - condition: template
  14.           value_template: "{{ 'почта' in trigger.event.data.text.lower() }}"
  15.         - condition: template
  16.           value_template: "{{ trigger.event.data.data == '/почта'}}"
  17.   action:
  18.     - service: telegram_bot.send_message
  19.       data_template:
  20.         target: '{{ trigger.event.data.chat_id }}'
  21.         disable_notification: true
  22.         title: 'Посылки:'
  23.         message: >
  24.           Ждут отправки: {{states('sensor.seventeentrack_packages_not_found')}}
  25.  
  26.           В пути: {{states('sensor.seventeentrack_packages_in_transit')}}
  27.  
  28.           Готовы к выдаче: {{states('sensor.seventeentrack_packages_ready_to_be_picked_up')}}
  29.           {% if states('sensor.seventeentrack_packages_ready_to_be_picked_up')|int > 0 %}
  30.             {%for package in states.sensor.seventeentrack_packages_ready_to_be_picked_up.attributes.packages%}
  31.             {{'\U0001F4E6'}} {{package.friendly_name}} ({{package.tracking_number}}){%endfor%}
  32.           {% endif %}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top