-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Wildcard and filter support #12
Comments
I can see this being useful when defining children but not so much for the main section entities. Unless it is last section with no children and you don't want to define names, colors or any other customizations, which seems kinda edgy. |
Well, my first section would e.g. be the sum of all consumers (since I cannot measure the grid directly). sensors.*power (wildcard only) These levels/children would all be created on-the-fly if wildcards and filters were available. Unlike e.g. HA Energy, where you have to manually add each new consumer (which is currently also the case for the Sankey card). Alternative would be to somehow make it compatible to auto-entities, but I don' see how this would work given the need for multiple levels and children. |
But how would you configure the connections in yaml? Right now each entity has children. If you deifne all entities with sensor.*_power, then I don't see a way to define children per entity without listing them explicitly. And if you list them anyway, the wildcard would be pointless. |
This is based on your https://github.com/MindFreeze/ha-sankey-chart#daily-energy-use Hope I did not make a logical error (since I cannot test it yet) but I think it would be along the lines of this (with wildcards & filters needed for sections and children.
Qucik question: can children also be assigned a name rather than an entitiy? |
This config doesn't make sense to me. I still can't understand how to draw the various connections by looking at it. It seems you want all the functionality of auto entities + ha groups or templates. This is way way too much. It would be better to ask auto entities to support more complex configurations like for sankey chart. If you want grouping, use HA templates. |
It really just requires wildcards and filters. Plus instead of defining children directly as entities, one would need to define children as given names (like the grid areas of grid cards).
It will be impossible to use auto-entities with the way Sankey is built because auto-entities can only return one set of entities and not one per section. P.S.: I will try to create a flow chart at home and post a picture of what above code would look like. |
So, obviously there are multiple ways to handle this.
It would then look something like this. And if we imagine that each house has e.g. 10 rooms and each room as 10 sensors, then the wildcard + filter + alias approach would reduce the amount of code significantly. Plus, all new sensors would automatically be available. So no additional maintenance after creation. This would be an example where first we have the sum of all sensors. Then a separation into areas. Then splitting into each areas sensors. All with really simple code if using new approach. As you can see, current approach is a lot of work if you have e.g. 100 sensors you would like to display, especially given that you have to define the child for every single sensor in the first section. |
I see the need for this as well. Currently I have Some sort of wildcards so I could define: type: custom:sankey-chart
Hope this was understandable. I will eventually get around to just adding all these by hand.. :-) |
This is getting out of hand. Now there's 2 of you :) I am currently working on version 1.0 of this card and the new code structure will make it easier to add this. But I really don't have much spare time so I don't know when I will get to it. |
Until this is added, I created a basic template for myself and thought I would share it. Just copy it to
It will create a list of all sensors of type "ENERGY Today" which is the type that the
Just adjust as needed :) Oh, and don't add a line break before the If you need a list of entity_ids rather than just a list of entities, simply change code to P.S.: Remember to adjust indentation after copy&pasting into card. |
Is your feature request related to a problem? Please describe.
Not a problem. It would just be nice to be able to use wildcards, similar to auto-entities.
e.g.
sensor.*_power
Describe the solution you'd like
Support for wildcards such as
entities: sensor.*_power
and filters such as
area: garden
Describe alternatives you've considered
Using auto-entities card, but not sure if that even works with Sankey card and it would be nicer to have this as an integrated feature.
Additional context
The text was updated successfully, but these errors were encountered: