Sorry crashed out last night. It was 1am where i am, & i have things to do today.
@petro
Will do, I will be doing that over the next few days.
Hmm ok.
Yes. Sweet thanks for that.
This is exactly the type of feed back i want.
For you it is, not a newbie like me it isn’t. Once again, it’s a rhetorical question designed to encourage the user to start playing with the code for them selves.
What I love about the template editor is that you can play with code & see straight away what the result is, great way to learn.
Thank you for those links (I had just started asking my self the question of is there a isvalid command), I do have a hyperlink to that page on the original post but, for E.g.
{% if variable is defined %}
value of variable: {{ variable }}
{% else %}
variable is not defined
{% endif %}
You look at that & it makes total sense to you, but a newbie looks at that & is not sure what parts of that statement can & should be changed. Having some code that shows the user immediate results & can be change easily so the user can see how it works, is what is missing. The default Demo Template tries to do this, but there isn’t enough examples & none of it is to do with the lights, which is what almost every newbie starts off with.
Any way thanks heaps everyone, your input has been greatly appreciated. I hope you continue to take an interest, & share your vastly more experience with me & others on this post.
So that it’s clear what is the point of this post? It is that I am trying to learn Jinja2 Templating for home assistant. I would have liked more examples in the style I have above, & I am more than happy to share what I have learn on this adventure. Since I got half a dozen like within a few hours of posting the original, I assume other newbies agree.
The point of the Second code block will be dealing with 3 different types of variable data ‘entity_id’, ‘device_id’ & ‘area_id’ because that is the data a user will using when making A blueprint targeted at lights.