custom-cards / flex-table-card

Highly Flexible Lovelace Card - arbitrary contents/columns/rows, regex matched, perfect to show appdaemon created content and anything breaking out of the entity_id + attributes concept

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[PROBABLY NOT A REAL BUG] formatting - like a space after a comma - can break column data selector

pejotigrek opened this issue · comments

not a big deal [even if I've fought with errors for an hour just to find out about that ;)] and also maybe "it's just me", but while configuring multi-data column, with data:, a space is interpreted as part of the column name. I'm just posting this in case someone would encounter the same issue.

let's say I have entity with the string-attribute sensor_id and numeric-attribute sensor_readout, now this example:

data: sensor_id,sensor_readout
multi_delimiter: "|"

outputs: "abc|123"

but when I add a space after the comma (thanks to my OCD and work-related-habits to help with formatting):

data: sensor_id, sensor_readout
multi_delimiter: "|"

this outputs:: "abc|null"

as it treats space as a part of second column probably.

I know, that example given in documentation is without a space, but first I just thought that it was an accident ;)

good finding, I would also consider this a bug. As field-names are likely to not contain white spaces the resulting field-names after the split using , should be trimmer/stripped from white spaces, should be easy to fix