Now, move onto a better solution than scrolling the whole table which is terrible. The scrolling posted above in the author’s samples will not suffice. A table should scroll the body and not the whole table. Should be able to do that in pure CSS
@Ildar_Gabdullin … please take a look here and tell me where I am wrong.
I am trying to use flex-table to grab stats that are multiple layers deep. I do not see how this is possible as to me, nothing beyond data: myarray works. data: myarray.myarray does not nor anything I have tried to iterate over things.
Is is possible to use a column in which the data uses a “modify” as a “sort_by”? I have tried but it appears it is not possible. I was trying to extend the four sensors into a different view that combines them back into one card with all teams. I get the data, but I cannot sort this:
When more than 1 column have the same source, it will sort by the first one, so in order to get to what you want, copy that column to the first column and then add hidden: true, so the column will be there, will be used for sorting, but won’t be visible.
Even with the column not hidden it doesn;t work I can tell that even in the original because it would assume that the sort would be team name. Tried you sample too with no name, none of those work. Nothing sorts as far as I can see unless it is sorted by a direct attribute without “modify”
Now of course I could create a new sensor but no. It already is bad enough that NHL needs 5 sensors (and NFL 7, and MLB 7) just to have conference and division breakdowns.
EDIT: I did not put sort_by: entries!!!
That works!
That is huge. So now for my major sports card, I can have Divisional, Conference and Overall stats. Then onto what logic to apply for possibly implementing Wild Card
entries is a list, each element is a dictionary, isn’t it?
Then how this “sort_by” is supposed to work?
What you should have done and you did not - specifying an ID for a particular column and selecting this ID for sorting.
Exacty. Understood. At first I had tried with the wrong “sort_by” and thught it over. The missing link is from @EdwardTFN. I would not have “guessed” that given a frankly not-sortable entry yet “sort_by” is provided , it sorts by the first column
Right now working perfectly for Divisional, Conference and Overall. Just need to think through the logic of wildcard.
Nice)
Hope your home has become much smarter with this sport info)))
Seriously, so far I have found only one application in my HA for this card - some tech info about network switches, that is all…
I have a simplistic view. I hate going to other Apps/Websites. I like in all in one thing. Especially one that does not track everything I do.
Flex table has help me with River Flood status and now Sports scores and standings.
All lights, music, tv remotes, internet status, cell phones, calendars … and yes even Pokemon for the kids.
I post most all the results and YAML and such on GIT for others.
Probably the main reason of not using table in my setup is that for almost each sensor I have Entities card + graphs + buttons…
It will be great if you share some ideas of using this card.
For me - even only screenshots with description will be fine, w/o code.
Imho, there is TOO much hype & expectations about this “set precision” feature.
May be I am a special person - but I do not use this feature at all.
In many integrations (template, snmp, …) a user already may define any precision.
And this “set precision” feature only affects Frontend - internally states are intact (as it should be).
Again imho - cards should show “raw” intact data, not damaged by any next untested Frontend changes.
Check Github issues - currently people have problems with displaying data with changed precision.
If you really need to change a precision for some data in your flex-table - I recommend to use “modify”.
P.S. Please avoid posting a large code to demonstrate ONE issue. MWE
- type: custom:flex-table-card
entities:
include:
- input_number.test_number_very_small
columns:
- name: value
data: state
- name: value .0
data: state
modify: Number(x).toFixed(0)
- name: value .x
data: state
modify: Number(x).toFixed(1)
- name: value .xx
data: state
modify: Number(x).toFixed(2)
- name: value .xxx
data: state
modify: Number(x).toFixed(3)
- name: value .xxxx
data: state
modify: Number(x).toFixed(4)
- name: value .xxxxx
data: state
modify: Number(x).toFixed(5)
- name: value .xxxxxx
data: state
modify: Number(x).toFixed(6)