Core integration Alerts appears to no longer render template data in notifications
frederickjh opened this issue · 2 comments
The problem
Previously using a template, {{ now().strftime("%H:%M.%S") }}
, to render the current time in an Alert notifications worked. Now the template is sent as part of the message.
What version of Home Assistant Core has the issue?
core-2024.10.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
alert
Link to integration documentation on our website
https://www.home-assistant.io/integrations/alert
Diagnostics information
home-assistant_alert_2024-10-23T17-56-10.426Z.log
Example YAML snippet
alert:
electric_fencer:
name: '{{ now().strftime("%H:%M.%S") }} Electric fencer is not using power'
done_message: clear_notification
entity_id: binary_sensor.electric_fencer_plug_device_in_use
state: "off"
repeat:
- 5
can_acknowledge: false
notifiers:
- mobile_app_frederick_s_sm_a515f
- mobile_app_nokia_g42_5g
data:
tag: electric_fencer
group: Electric Fencer
clickAction: /food-forest
persistent: true
sticky: true
channel: electric_fencer
Anything in the logs that might be useful for us?
No response
Additional information
This may be related to the following recent issues that also seem to be about templates not being rendered in Alert notifications.
Hey there @home-assistant/core, @frenck, mind taking a look at this issue as it has been labeled with an integration (alert
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of alert
can trigger bot actions by commenting:
@home-assistant close
Closes the issue.@home-assistant rename Awesome new title
Renames the issue.@home-assistant reopen
Reopen the issue.@home-assistant unassign alert
Removes the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-information
Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-information
Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
alert documentation
alert source
(message by IssueLinks)
I not sure what changed, but I just figured out that the title:
variable does allow for templates. There is no mention of templates being accepted in the name:
variable. Previously I just had the name:
variable set. Now I have it and the title:
and message:
variable set with the template in the title:
.
So, I am closing this as is should have read the documentation better, as it does not appear to be an issue.