ha-fusion icon indicating copy to clipboard operation
ha-fusion copied to clipboard

FR: Component visibility control

Open taylorfinnell opened this issue 1 year ago • 4 comments
trafficstars

Thanks so much for making this project, it's awesome!

I would like to request a feature that allows visibility logic for components.

Example usecase:

  • Only showing a camera feed when a motion binary sensor is on

Is this something that you could see fitting into this project? I would be happy to take a stab at it. I imagine a checkbox on the component's configuration page named something like Visible when. When checked the user can pick various binary_sensors. Possibly combining multiple into an expression, eg: binary_sensor.outdoor_motion and binary_sensor.is_dark. I think section visibility should be controllable too

Thanks!

taylorfinnell avatar Jan 02 '24 23:01 taylorfinnell

It seems that this could be best implemented with a Visibility Template field. Then we can use the existing templating support to just let it return true/false.

maddox avatar Jan 03 '24 00:01 maddox

I think it should be a new "card", something like conditional card, but yes with template

matt8707 avatar Jan 03 '24 20:01 matt8707

this would also go hand in hand with the chips / header request. If there is motion show a motion icon with a badge number. if there is a door open (or unlocked) show an icon with a badge number.

jaburges avatar Jan 12 '24 00:01 jaburges

i use auto entities for window sensors. the card is not visible, if no windows are open maybe this would be an option for the sidebar

type: custom:auto-entities card: type: entities title: Fenster filter: include: - domain: binary_sensor entity_id: 'contact' state: 'on' options: {} show_empty: false

image

image

t0bse avatar Jan 22 '24 07:01 t0bse