Home Assistant Cookbook - Discussion Thread

I recently saw something added to the cookbook that explains how templates are evaluated. I feel that belongs in the official documentation (in the Rate Limiting Updates section) where this topic is introduced and explained.

I feel there should be a clear division between the cookbook and the documentation. The docs explain basic concepts whereas the cookbook shows how to apply those concepts. Otherwise we will have two references explaining concepts and neither is complete (i.e. you will have to read both to fully understand a basic concept).

4 Likes

Good point - and a good distinction. Perhaps something based on the cookbook post should be submitted for the docs, which might benefit from a summary section.

Cookbook posts should certainly include links to the documentation (which I’ve added in this case).

Thoughts, anyone?

Edit: The original post by @petro was in response to a question, not a community guide.

1 Like

@123
Ya I translated it and attributed it on a request, but do whatever needs doing.
I personally don’t know the answers there.
It was @parautenbach 's request originally.

I agree and I came to sit down now with the intention to submit a PR to the docs, but now I got myself in a twist. Maybe I’m overcomplicating it.

Petro’s post included this link: Template.

My first instinct was to add it to Templating, but what he wrote is a combination of the states object and templating functions.

Ideally one would like to keep this all together, but it kind of sits between the two pages. That rate-limiting section mentions the state object, but I think adding a list of template functions in there will be rejected in a PR.

Anything out of context (directly) will not fly.

Nwe cookbook item:

Organising and annotating automations.

1 Like

Added section on using trigger_id’s for documenting triggers to that one.

Decided against adding template comments to that because out of scope.

2 Likes

Precisely. Unless someone has a suggestion, I’m going to park my attempt. We have the cookbook, so the gap is filled.

Hello, great work on the cookbook so far!

I would like to suggest that Getting Started with HA and Setting up HA to be separate sections because it’s quite a huge scope from a beginner’s point of view.

1 Like

It would go in templating. The information mentions a state object but it’s not important for state objects.

1 Like

Tidied up a bit. What do you think? :grin:

3 Likes

Yeah I think it would line up nicely!
Thank you for the hard work!

Would you consider having a post for template snippets and examples? Might be a little out of scope (or too defined).

I have some snippets and patterns in my arsenal which may help with templating.

Absolutely - it’s open to everyone to contribute. :grin:

The main thing is not to duplicate the docs (see discussion above):

Discovered by accident…

Looks like you can add comments to posts by enclosing them in angle brackets - have I got this right?

Used sparingly this might be useful in the index post - to indicate where a link appears in more than one section, for example. (I’ve added a couple of comments in the Troubleshooting section.)

They only seem to be visible in the edit box - not in edit history.

Myself and Tom I have been using that for years to get past the minimum post threshold… see next post.

F

3 Likes

New cookbook post:

How to make notifications more informative.

I’m sure there’s lots more to be added to this one… :grin:

Now that I see your new addition I’m thinking we need something for using the context of a trigger too. Many people want to know which user did something, or whether a physical switch was flipped.

It is kind of documented, and perhaps here we can argue too that the docs should just be improved.

Anyway, there are numerous posts about this, but here are two of interest:

1 Like

I was thinking the exact same thing about context last night, but I was to tired to start it.

2 Likes

Good idea. But think of a particular task that someone might want to perform and use that to demonstrate. The posts you link to are very theoretical.

Show, not tell! :grin: