Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow entities filter in collapse clause. #640

Open
tomtom13 opened this issue Jan 9, 2024 · 8 comments
Open

Allow entities filter in collapse clause. #640

tomtom13 opened this issue Jan 9, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@tomtom13
Copy link

tomtom13 commented Jan 9, 2024

Hi
I would like to be able to provide a flexible filter to collapse clause (it doesn't work now).
Reason is that I use collapse batteries that are still good. However some devices will run forever on fumes, for example all my temp sensors will run on 4 -> 2% for a month, while door sensors below 20% are finicky. I know that it's possible to provide a fixed list of devices, however at over 80 battery devices (and growing) it's hard to keep up.

@tomtom13 tomtom13 added the enhancement New feature or request label Jan 9, 2024
@maxwroc
Copy link
Owner

maxwroc commented Jan 9, 2024

Please give an example of the filter config you're thinking about

@tomtom13
Copy link
Author

tomtom13 commented Jan 9, 2024

  - name: Temperature sensors 4 - 100%
    min: 4
    max: 100
    filter:
      include:
        - name: entity_id
          value: '*_temp_*'

@tomtom13
Copy link
Author

Please give an example of the filter config you're thinking about

So would that be considered worthy including in next release ?

@maxwroc
Copy link
Owner

maxwroc commented Jan 26, 2024

It is hard to tell at this point what will be in the next release and when will it happen. Usually I tag (set milestone) when I decide that I have enough time to implement something and I'm starting working on it, so please look forward for it to be set.

Regarding the proposal. Having a filter here and there might be confusing for people. But if we go forward with this idea it would mean that min/max settings in groups should go away, I think.

I need to think about it more

@tomtom13
Copy link
Author

Regarding the proposal. Having a filter here and there might be confusing for people. But if we go forward with this idea it would mean that min/max settings in groups should go away, I think.

That would be a bad idea in my opinion. People use groups to hide items that have greater battery level THAN where it's actually a problem. For me having multiple collapsible groups is beneficial, because different device types require new batteries at different levels. For example my temp (and humidity sensors) will run happily from 10% -> 3% for three or more months and this is when I start to think about changing them all. Light switches bellow 20% are unreliable and window sensors below 30% can just hang. So I honestly think that having a group to which people can filter based on name and level is a good option.

I've seen people here noting that UI groups don't really work - I bet you it's because they wan't to filter in groups. For time being I've got a collapsible group with hardcoded names, but if I add more of those sensors, then I need to remember to add those by hand.
Example:
Screenshot 2024-01-26 at 14 42 53

But hey, I might be just plain lazy ... still I think that adding more perpetual administrative effort (for example if you rename sensor, or update your naming) in the long run makes people dislike something.

@maxwroc
Copy link
Owner

maxwroc commented Jan 26, 2024

By removing min/max option I meant that the same will be achievable via filter conditions.

@tomtom13
Copy link
Author

Ah, OK.
As long as there is an option for MIN / MAX - I'm fine

BUT BUT BUT

that seems like config breaking change, if moved around ... a best way to get an angry mob ;)

@jvnrambo
Copy link

jvnrambo commented Apr 15, 2024

Hello, and first of all, thank you @maxwroc for the excellent card. I think that like @tomtom13, a lot of people would also appreciate it if you made this option available to put a filter like the one that was suggested, as it would be very useful to be able to initially filter all battery entities, and then group them within the collapses, also being able to reapply more filters, instead of having to specify all entities in a fixed way. Using a group helps, but with the filter it would not be necessary to pre-create the group. Or is there any way to generate a template to filter the entities within the collapse?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants