Skip to content

Commit

Permalink
Merge pull request #3 from Emilv2/master
Browse files Browse the repository at this point in the history
show transport type icon
  • Loading branch information
bollewolle authored Feb 28, 2020
2 parents 8a1b235 + 0f33277 commit c03fa5b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions delijn-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,9 @@ class DeLijnCard extends HTMLElement {
let newText = feed[entry][columns[column].field];
card_content += `${newText}`;
} else if(columns[column].field == 'line_transport_type') {
// ideally we show icons here for the different types (not yet implemented)
card_content += `<td class=${columns[column].field}>`;
let newText = feed[entry][columns[column].field];
card_content += `${newText}`;
// show icons for the different types
let transport_type = feed[entry][columns[column].field].toLowerCase();
card_content += `<td> <ha-icon icon="mdi:${transport_type}"></ha-icon>`;
} else if (columns[column].field == 'due_at_schedule' || columns[column].field == 'due_at_realtime') {
card_content += `<td class=${columns[column].field}>`;
let newText = feed[entry][columns[column].field];
Expand Down

0 comments on commit c03fa5b

Please sign in to comment.