ha-fusion
ha-fusion copied to clipboard
FR: Component visibility control
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!
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.
I think it should be a new "card", something like conditional card, but yes with template
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.
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