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

Custom data filtering #29

Open
zdeseb opened this issue Sep 15, 2024 · 2 comments
Open

Custom data filtering #29

zdeseb opened this issue Sep 15, 2024 · 2 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@zdeseb
Copy link

zdeseb commented Sep 15, 2024

I am new in Home Assistant world so maybe I am missing something but I was unable to find a way how to filter data displayed by flex-table-card. And by filtering I mean for example filtering by trip_headsign.

What I want to achieve is to display trains departing from Praha-Smíchov but I am only interested in direction out of the city, not to Praha hl.n..

I had expected to be able to filter either in flex-table-card entities or somewhere in between PID integration and the dashboard but found nothing :-)

Am I missing something or is the only way to add a custom filtering feature to PID integration itself?

@dvejsada
Copy link
Owner

@zdeseb Apologies for not responding earlier. Did you manage to find the solution? In case of buses and trams, this is handled on the integration level due to the fact that different directions have different platforms. In case of trains, unfortunately, there is only 1 platform for both directions. So it cannot be handled in the integration level, but it has to be handled on the dashboard (card) level. I believe such filtering should be possible with flex-table-card, I will have a look over the weekend.

@dvejsada dvejsada added the help wanted Extra attention is needed label Sep 23, 2024
@dvejsada dvejsada self-assigned this Sep 23, 2024
@zdeseb
Copy link
Author

zdeseb commented Sep 23, 2024

@dvejsada I hoped flex-table-card had such an possibility but haven't found any. Eventually I tried entity-filter combined with flex-table-card inside but there are some problems while rendering dashboard (it works fine while I am adding the card but after refreshing dashboard there is a JS error - didn't have time to investigate further).

My idea how to implement the feature into PID integration was to add new editable parameter (similar way user selects the stop but without the dropdown, just text box) when adding new device. This value would be optional containing some filter expression. Question is if it could be done in some flexible way, unfortunately Python is not my cup of tea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants