Hi folks,
back again as Iβm learning fast what I want to achive with HA (really great tool).
Problem is that my knowledge at some points is still laking some levels
First of all, I figured myself out (by reading many examples and documentations), how to read the correct SNMP values from my Windows Server to sensors
Now I want to send an automated notification via Telegram, when e.g. percent used disc space is >80%.
Fine, working.
Now I want to know which of my 3 discs firred the automation. Stuck
Most probably I could use a lengthy 'if elif endif
β structure but I guess this can be done easier.
So, here is my most recent work:
- id: '1575363343504'
alias: Disc full LRSERVER2
description: ''
trigger:
- above: '80'
entity_id: sensor.lrserver2_storage_used_percent_disc_c
platform: numeric_state
- above: '80'
entity_id: sensor.lrserver2_storage_used_percent_disc_f
platform: numeric_state
- above: '80'
entity_id: sensor.lrserver2_storage_used_percent_disc_g
platform: numeric_state
condition: []
action:
- data_template:
message: Disc LRSERVER2 above 80% {{ trigger.entity_id }}
service: notify.telegram
If I just send plain text in the message like
message: Disc LRSERVER2 above 80%
everything is working fine.
When using the {{ entity_id }}
in the message I get this error in the log.
Error sending message: Can't parse entities: can't find end of the entity starting at byte offset 74. Args: (999047806, 'Disc LRSERVER2 above 80% sensor.lrserver2_storage_used_percent_disc_g'), kwargs: {'parse_mode': 'Markdown', 'disable_notification': False, 'disable_web_page_preview': None, 'reply_to_message_id': None, 'reply_markup': None, 'timeout': None}
Iβve tried various options of brackets, quotes etc. (like in Automation Templating automation 2) but no success.
Who might shed some more light on my miserable life
Thanks upfront to these great people that monitor all us noobs and help so fast, like you did with me in the past days.
Ralf