-
Notifications
You must be signed in to change notification settings - Fork 6
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
filter on line number #12
Comments
I'm not sure anymore but I don't think so no. I'm not really planning on updating this card anymore. I'm experimenting on useing the "flex-table-card" which can be used for a lot more purposes instead of mainting a specific card here for just 1 puprose. It's still a work in progress but so far I got the following config with the "flex-table-card" which closely simulates the existing functionality of the "delijn-card", but it also includes the fact if a tram/bus is cancelled: type: custom:flex-table-card
title: Brugsepoort (direction Center)
entities:
include: sensor.brugsepoort_gent
columns:
- name: Line
data: next_passages
modify: >-
'<div class= "line-number" style="padding: 1px 1px 4px 1px; height: 16px;
color: #' + x.line_number_colourFrontHex + '; background-color: #' +
x.line_number_colourBackHex + '; border-color: #' +
x.line_number_colourBackBorderHex + '"> ' + x.line_number_public +
' </div>'
align: center
- name: Type
data: next_passages
modify: >-
' <ha-icon icon="mdi:' + x.line_transport_type.toLowerCase() +
'"></ha-icon>'
- name: Towards
data: next_passages
modify: x.final_destination
- name: Due in (min)
data: next_passages
modify: x.due_in_min
- name: RT/C
data: next_passages
modify: |-
if (x.cancelled)
'<ha-icon icon="mdi:cancel">'
else if (x.is_realtime)
'<ha-icon icon="mdi:signal-variant">'
else
''
align: center
style: |
.line-number{
display:block;
float:left;
min-width:2.75em;
text-align:center;
font-weight:bold;
color:#fff;
border-radius:4px;
border:3px solid #000;
margin-left:0rem;
margin-right:0.75rem;
font-size:1rem;
line-height:1.5em;
} I haven't tried filtering though, not sure if that's possible with flex tables either. It does support the auto entities, perhaps something is possible there, although it's more for listing multipe entities I believe and not for filtering records within an entity. Anyway, hopefully you can find a solution. |
Thanks .. I tried the flex solution and it seems to work...( for a minute) .. then i got this strange error: ( not sure if the sensons should come back as "unnamed" neither? you seem to have the "haltenaam"? not sure where this comes from ? i guess installation went wrong somewhere? For the record the config: sensor:
( yes I ask data from 4 "haltesleutels") |
strange... all work if i use sensor.turnhoutsebaan_antwerpen Why are some changing name and others are not? don't see it. |
I believe the _2 typically happens when an Integration was removed and then created again, or when there's 2 entitities being created with the same name. I have some of those for other Integrations as well. |
Is there a way to filter this card so that only selected line numbers are shown?
At our stop several bus lines pass and I'm only interested in one of them.
The text was updated successfully, but these errors were encountered: