Home Assistant Cookbook - Discussion Thread

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:

2 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:

Context will be difficult because all the information that’s widely used about it is simply wrong. People are using a blanket copy/paste template to get a specific scenario and that’s it. Context is extremely powerful, but there’s plenty of gotcha’s related to it.

E.g.

If you get the context in an automation between the trigger and actions, it’s 100% wrong unless you get it from the trigger.

If you get the context in the action section, it’s correct.

Context is populated after conditions and before actions run.

2 Likes

Indeed! There are many, many posts on contexts. These are just two of my own reference ones that I’ve saved.

Petro’s articulated the problem:

I’m not sure yet how to distill this into useful, concrete information.

I’ve never been able to get very reliable code working using contexts, except for the simplest of cases, because one needs to infer things. You have to basically generate the different scenarios for your own case and it gets quite tricky if you have e.g. a script called from an automation and in the script you access the script’s context.

Perhaps the real issue is that some of this should rather be baked in at at a deeper level or even provided by integrations themselves.

1 Like

Rate limit clarifications by parautenbach · Pull Request #32151 · home-assistant/home-assistant.io (github.com)

I’ve been mulling one for triggers, trigger variables, limited templates in my head since this started, but it always turns into a bible . too long. Working on breaking that up.

2 Likes

Hello, I was wondering if it would be appropriate to add the following installation guide

Installing HAOS in a VM on TrueNAS Scale

EDIT: Added to cookbook

2 Likes

Please do… :grin:

Edit: Thank you!

1 Like

Found something cool, added it in.
Custom Search Links for Frequent Searchers.

1 Like