#Hide a section if no children are visible

1 messages · Page 1 of 1 (latest)

worn briar
#

I have a section at the top of my dashboard called dynamic actions. This section has a number of switches, or sensors in it that are only present in specific situations. For example, fridge door open or set alarm.

Most of the time those dynamic actions are empty because they are only visible when something specific happens that needs to be actioned. I want to hide the section if none of the children are visible, if at least one of the children are visible then show the section.

There's no easy way to accomplish this that I can see except for replicating all of the logic into another sensor and driving the section visibility off of that sensor, which I think is not great.

Does anybody else have any ideas?

wintry lava
#

If you can use Groups in Helpers, you could apply visibility rule to the helper created as if any members =on then Helper = on.

I had similar challenge but could not create a group helper so

  • created Toggle Helper
  • created Automation, this has every sensor as a trigger
    If any sensor is positive then Toggle Helper on and visibility section shows
    If no sensor = positive then Toggle Helper = off and dashboard section visibility = hidden

Not sure how many sensors are being monitored, I have 10 entities being monitored.

worn briar
#

Thanks. Yeah I wanted this to be purely UI..by guess it cant be.

Surely there must be a way to access children content from a container.

wintry lava
#

If they are all Binary Sensors creating a Helper Group (Binary Sensor) e.g. "Sensors" is simple and then just apply Visibility rule to section using the state of "Sensors" = Clear.

Avoids automations / scripts

I did look at using labels but this option was removed a while ago, maybe they will bring the function bacl