Anyway to hide items from UI/Group based on value

So I have a few sensors showing which zone I’m in and how far it is to other zones. If I’m at a zone the time is zero. Anyway to hide them when the value is 0 (or whatever I set it to)

This is my current setup. When I’m at work (more often it’s home), I dont need to know it’s zero minutes to home. :slight_smile:

What I’d like is something like this. Basically anytime the value is 0 (Might want it to be less than 2, sometimes it says one if the gps is a bit off) I want it to not be shown.

This is more of a nice to have, something to learn than anything else. Not a huge deal.

@Mariusthvdb things that are similar to this. Pretty sure you can use a data template on the visible property on groups, not sure if that translates to sensors though.

You can use customization to hide entities (hidden: true), but AFAIK not based on a value template.

To mimic this, you could build 2 views. One with the sensors shown and one hidden. Since a view is a group, you can use group.set_visibility to hide one and show the other dynamically.

You can vote for this feature request (or develop it yourself):

using this in Tiles custom-ui, following CSS:

  - entity: light.mobile
    label: Mobile
    icon: mdi:transfer
    column: 3
    row: 14
    row_span: 2
    style_template: >
      if (entities['sensor.mobile_reachable'].state === 'False') return 'display:none';

only shows the light if it is reachable…

That does require the use of Custom UI and is impossible with standard yaml configuration.

correct. that wont be an issue would it?

Not an issue, but I’d like to stay away from this as long as possible. :blush:

once you’ve seen the possibilities, you will never go back… endless and so much more pleasing to the eye. I;d say @eddi89 and @andrey ’ custom cards are unmissable for a great Hassio UX and ought to be standard tools in everyones HA toolbox

next to not showing it, one can also have it shown n/a:

07

wouldn’t know how to do that with regular yaml and templates. Wouldn’t say it’s impossible, just don’t know, but this is so nice.
was a bit more complex though:

    style_template: >
      if (entities['sensor.driveway_reachable'].state === 'False') return 
      'border: 1px dotted #D3D3D3;color:#D3D3D3; --tiles-text-sec-color: #D3D3D3;background-color:var(--paper-card-background-color)';

one can hide/show a group based on the value_template though, and if that group only contains one item , the question is answered isnt it?

Custom_ui does use standard yaml configuration for the most part, and usually just involves dumping a couple of files in the www directory.

you got a link to those UIs?

https://github.com/c727/home-assistant-tiles