Hello,
I’m trying to show a grid with graphs for all my temperature sensors. However, it is a bit hard to understand how I can combine the three plugins mentioned above to make it as automatic as possible.
If anyone knows another solution using another card, the grid for example, I am also happy to use that instead.
Sometimes I wish that, instead of yaml configurations I could use functions taking and returning parameters, that way at least I will know what is the expected output and inputs.
thanks in advance.
– EDIT –
Here is another attempt. I feel this is closer and more correct, but still shows me an error: Cannot read property 'length' of undefined
So, I’m very sure that my last attempt is almost perfect. My only problem is that auto-entities is injecting the value into the card as entity while the card expects a list of entities, even if it is of a single entity. If I had just a way to tell auto-entities how to inject the entity it will be 100% perfect
Dam it, I was so close (and the feature was so hidden on the docs…).
Seems that you can use an specific string on the options of the auto-entities and it will inject there the entitiy name:
In the options: option of the filters, the string this.entity_id will be replaced with the matched entity_id. Useful for service calls - see below.
This was almost perfect for my use case, I couldn’t believe it was so convenient…
However, this is what I encountered:
The mini-graph-card fails if you provide an entity option, and auto-entities will inject it even if you use the previously mentioned feature.
I wish cards just ignore whatever they don’t want to take into account, instead of failing and making life hard for their users.
Finally!
I thankfully, as a developer I had an intuition. I thought that, if I provide an entity value the auto-entities will not inject it, and I thought that if the value were undefined the mini-graph will not detect it so I added an empty entity: entry… and it worked!
This is my final card definition:
This is to ensure that auto-entities not pass “entity” attributes to mini-graph-card and passed it on entities.
Just FYI for other people, if you use this, exclude filter on auto-entities can’t be applied, that’s why you can use “not:” options in include filter. On my case, I filter sensor that have name “battery” or “nas” in its name.
I combine custom:auto-entities , custom:layout-card, and custom:mini-graph-card to have 2 column sensor, here is my config:
Hi @danielo515, @itanumih and others, this solution fits my need perfectly but I can’t quite get it to work, it doesn’t seem to pull the data through. Any ideas why?