8
submitted 1 year ago by [email protected] to c/[email protected]

I'm working in the template editor, and if I use the 'and' operator, an entity disappears. I finally found/guessed a working combination but I can't find any examples to see the right combo of operators and parenthesis. HA tells you to look at jinja docs, jinja literally says "There is not an awful lot to talk about here"

any template guru out there know the secret sauce?

top 3 comments
sorted by: hot top controversial new old
[-] [email protected] 3 points 1 year ago

I suspect this is a rendering/process thing rather than an accuracy thing. Have you tested if the logic of the first one isn’t listening to the other fields?

Thinking it through, in an ‘and’ test, you do only have to watch for the the state of the first clause, because so long as that is false, it doesn’t matter what the rest say. In the ‘or’ clause, you need to watch for the value of all of them.

[-] [email protected] 1 points 1 year ago

I'll play around with that too, but I just figured out i can make the entities appear and disappear if I change 'false' to 'off'. I wish their forum wasn't a "read our shitty docs" auto-reply.

[-] [email protected] 1 points 1 year ago

oh wait, maybe changing it to false instead of off halts the processing. I think you're right.

this post was submitted on 10 Sep 2023
8 points (100.0% liked)

Home Automation

2918 readers
1 users here now

Discussion about general home automation ideas and projects, home automation protocols like Z-wave, Zigbee, Matter, etc, and home automation software and hubs like HomeSeer, Home Assistant, OpenHAB, Homey.

founded 1 year ago
MODERATORS