How is the "Next Trains" block in the "Neighborhood" view made? #18
-
It's in the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I do know how to get the actual transit data, just the display is my struggle :) |
Beta Was this translation helpful? Give feedback.
-
Right -- I spent some time re-creating this. The card uses the multiple-entity row from HACS. Here's a formatted card. I don't have the "Next train" due yet, as I just figured this out fiddling around a few minutes ago. I remembered your post, and thought I would share the love. @Madelena, I think, added some padding to the sections, as I've seen it in some other cards. type: entities
entities:
- entity: sensor.l_to_manhattan
name: "L to Manhattan"
icon: mdi:subway
type: custom:multiple-entity-row
show_state: false
entities:
- attribute: Due in
unit: min
styles:
text-align: left
- attribute: Due at
styles:
text-align: left
- entity: sensor.l_to_manhattan
type: custom:multiple-entity-row
show_state: false
name: ' '
icon: ' '
entities:
- attribute: Next due
unit: min
- attribute: Next train
styles:
text-align: left
- type: section
- entity: sensor.l_to_Canarsie
name: "L to Canarsie"
icon: mdi:subway
type: custom:multiple-entity-row
show_state: false
entities:
- attribute: Due in
unit: min
styles:
text-align: left
- attribute: Due at
styles:
text-align: left
- entity: sensor.l_to_canarsie
type: custom:multiple-entity-row
show_state: false
name: ' '
icon: ' '
entities:
- attribute: Next due
unit: min
- attribute: Next train
styles:
text-align: left
This should get you started. You'll either have to set up a conditional card, so that null entries aren't displayed, or edit the GTFS sensor, so that the unit is included if it's not null. |
Beta Was this translation helpful? Give feedback.
Right -- I spent some time re-creating this.
The card uses the multiple-entity row from HACS.
Here's a formatted card. I don't have the "Next train" due yet, as I just figured this out fiddling around a few minutes ago. I remembered your post, and thought I would share the love. @Madelena, I think, added some padding to the sections, as I've seen it in some other cards.