I’m stuck on why this automation is not working…I have others that work fine for a fridge but this refuses to trigger if I have the line present that prints out the friendly name which triggered it.
Anyone have suggestions?
If I remove the line {{ trigger.to_state.attributes.friendly_name }} it works fine…but the same template in other numeric-state automation works fine.
This is very odd…that fires the automation, but it prints out nothing:
And if I print out in the template-dev tab both of the entities that could potentially trigger that numeric-state automation, it looks like both of them should have friendly names:
I’m confused what you mean new format? I JUST had to do a major re-write on all my Telegram message-send automations to fix a “repair” due to changes in the Telegram bot format of stuff…this changed again since December-January of this year???
Also I just did a test adding a different sensor and that fires, so it seems like it only is failing to fire correctly on friendly_name when its the apcupsd integration sensors?:
actions:
- action: telegram_bot.send_message
data:
target: <chat id here> # you need to specify your chat id here
title: 'Alert!'
message: >
Check {{ trigger.to_state.name }} High!
Now: *{{ trigger.to_state.state }}F*
Exceeded limit {{ trigger.above }}F for {{ trigger.for }}
I don’t have a “chat ID”, I’m not sending it to a group I’m sending it to a singular user which was set up thru the GUI as is now required for the Telegram bot?
I don’t have a link, but that’s what I found reading thru these forums. No idea how long ago, I don’t keep a log of every of the millions of pages I have gone to.
I don’t see anything on the doc you linked that talks about messaging a USER, only chat groups and replying to interactions. This is not what I’m doing, I’m direct messaging a specific user. All I have is the user’s username and user ID that was set up thru the integration.
I also can’t find any way to add something thru the GUI that would let me tie a “chat ID” to a user to let me pick from that. Its not reasonable to have to put the user’s ID everywhere in every automation and have to keep separate track of who that is for.
When I go to the Devices & Services → Telegram bot I only see the notifiers which is what I just got done converting things over to?
Next time you do that, look at the date the post was written. There is a lot of out of date info here. Always check the docs for the latest information.
Ok, that is different from what I see but I use telegram bot webhooks.
What do you see when you click on the Matt Mill… entity then click on the cog icon in the pop-up?
It looks like maybe if I paste a user’s user-ID into the “chat ID” that can trigger a message in the dev tools but that also is not really managable.
How then could you tell apart who’s messaged by which automation when you have more than one user? Is 1234567890 or 098765431 me? It needs to be something sensible named set up in one place thru the integration, not a random number with no context spammed thru every single automation, and that if it has to be changed will be a major nightmare to untangle.
I’m not familiar with what “telegram bot webhooks” means.
I renamed mine in the GUI because I would never remember the random numbers it put by default in the name/entity ID - that way I can reference a human-readable name in automations instead of a long random string of digits:
That is changing. It is a work in progress. We will eventually be able to use entities but for now the best way is to use !secret to keep track of which id corresponds to which user/group.