-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report Templates for Home Assistant, JSON and at Large #1267
Comments
Thanks a lot for your effort, it does help a lot. Hopefully I will get time this or the next weekend to put together something. My idea is to basically mimic the
I would like to include information about the containers as well though, but I haven't written that part yet. |
I'm happy I could help - even in a small way!
Your rendered template looks amazing and I will definitely be using that 👍
That would be a good addition. If you wouldn't mind pointing me to a stub I would be happy to start fleshing out some documentation around this as a PR to help others |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I still aim to do this at some point... |
I don't think this is mentioned in the docs, but if you put Also you can use the template preview (alpha quality) to easier test your templates: |
Having the same needs as #1203 for notifications to be handled by Home Assistant, I've gone down the rabbit hole and have a means to potentially contribute to #1204
The ability to format messages in
JSON
template would be really valuable for manipulation down-stream.My apologies as my
go
is quite underdeveloped but I came up with thisgo
template solution:and ran with the following as a test:
Which results in:
Two notes
{{ range . }}
(as is every example) fails asData.Report
are returned asnil
. This forced me to run{{ range .Entries }}
instead.,
at the end of theJSON
array which may be problematic. I had to add in my own template function for decrement so that the final loop index would be able to match the size of the slice. Simply added:What do you think? Is there a way to make this a little neater? Does this help with documenting the
notification-report
issue?The text was updated successfully, but these errors were encountered: