Hey all! I’ve been chewing on this problem for a bit and I’ve hit a wall, I’m hoping someone here can point me in the right direction.

I have an auto entities card populating a series of mushroom chips on the top of my dashboard for stuff like lights on, available updates, and open doors.

The thing is, some of the doors that have sensors on them are open by default, and as a result the chips are there all the time.

Ideally I’d like to have seperate auto entities entries for each group, default open and default closed, but I’d like to keep them in the same card as everything else(they’re sorted by time triggered); and I can’t for the life of me figure out how to filter out specific entities from a single entry in the include filter. I can exclude something from the whole card, but I haven’t found anything that would allow me to just show certain closed doors or certain open ones.

Hopefully this made sense! I appreciate any ideas you have.

EDIT: So I finally got it figured out without futzing with my setup too much, sorry @borebore, I didn’t end up going with the template sensor. I ended up finding a python script that allows you to inject custom attributes, so I made an automation that anytime the “normally closed” doors updated their status it’d give them an “is_normally_open: true” attribute and filtered the auto entities chips off of that attribute.

Thanks everyone!

  • rambos@lemm.ee
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 months ago

    I guess you can add attributes to door sensors. Attribute “visible” with if statement that says NO if default open doors are opened or if default closed doors are closed. Then list all door sensors and exclude these with attribute NO.

    I never tried this, I dont even have door sensor, but that came to my mind. There might be better solution

    • thegreekgeek@midwest.socialOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 months ago

      Aha! I did some more digging and I figured out how. I wasn’t sure if you could just spin off new custom attributes in customize.yaml but according to this gentleman and scholar turns out you can! So everything is getting a normally closed attribute.

  • __init__@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 months ago

    TIL about the auto entities card. I’ll have to try that out. Since I don’t actually know anything about that card, I don’t have anything useful to offer specific to that plugin. But coming from a different angle, I wonder if using a template sensor to invert the “default” state and hiding the original entity (+ some clever naming) would help to make it behave how you want?

  • borebore@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 months ago

    Create a template sensor that is the opposite value of the door sensor and include that one in your auto entities instead of the door one.

    • thegreekgeek@midwest.socialOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 months ago

      Ope, that’d totally work. Definitely would be easier to impliment than what I was gonna do, which was try to add a custom attribute to identify normally closed or normally open.