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?

  • Bluesheep@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    10 months 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.

    • lemming741@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months 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.

      • lemming741@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

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