#Notify to Telegram Every Thing

1 messages · Page 1 of 1 (latest)

fresh star
#

Hi, I want to send everything in the logbook to telegram. Can you help me?

#

I made the configs with telegram bot. I can send notifications to telegram. I only want to send the ones in the logbook to telegram with the same text.

umbral grove
#

A standard HA instance, even not a big one may process dozens and dozens of state change every second.

You cannot simply trigger an automation for "every thing" this is not sustainable.

What do you want to achieve, explain us the goal and we will be better suited to help you

fresh star
#

I want to get the status change of devices. for example sensor triggered, lamp turned off, door opened.

daring saffron
#

you will still be flooded with messages, but you can choose which events to act on

fresh star
#

action: notify.telegram_notifier
metadata: {}
data:
message: >
{{ }} just changed from {{ trigger.from_state.state }} to {{
trigger.to_state.state }}

#

Can you help me get the entity name that is the trigger? @daring saffron @umbral grove

umbral grove
#

Without looking it should be trigger.from_state.attributes.friendly_name

#

Btw. Go to your automation. In edit mode.
And trigger anything. Like. Open your door or turn on a light. Basically do what you must to trigger the automation.

You’ll see a very small banner on the trigger itself stating TRIGGERED

#

And you’ll have access to all the trigger data.

#

Then it’s a matter of “filling the dots”.

fresh star
#

I seeTRIGGERED. For test every trigger will send me message "Test". It is done. But dont sent any message me when i wrote trigger.from_state.attributes.friendly_name

#

action: notify.telegram_notifier
metadata: {}
data:
message: >
{{ trigger.from_state.attributes.friendly_name }} just changed from {{
trigger.from_state.state }} to {{ trigger.to_state.state }}

#

DONE . I did it

action: notify.telegram_notifier
metadata: {}
data:
message: >
{{ trigger.to_state.name }} just changed from {{
trigger.from_state.state }} to {{ trigger.to_state.state }}

#

thx for help 🙂

fresh star
#

hi again @umbral grove 🙂

#

i need to contdition template but it is not run
{{ trigger.from_state.state }} != {{ trigger.to_state.state }}

#

or value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"

umbral grove
#

Easy on pinging the mods please

#

Send me the whole automation.

In your automation editor, click on the "3 dots" on the top right corner of the page.
Then edit in YAML
then copy the whole think surrounded by 3 backtip on the top and 3 on the bottom

#
like this
fresh star
#

'''
alias: Notify
description: ""
triggers:

trigger: state
entity_id:-ITEMS-ITEMS
conditions: []
actions:

action: notify.telegram_notifier
data:
message: >-{{ trigger.entity_id }} just changed from {{ trigger.from_state.state }}
to {{ trigger.to_state.state }}
mode: single
'''

#

It didn't work for me, maybe I had this setting turned off.