RMV transport departures

This is a shameless modification of @DavidMStraub custom card to make use of the new RMV public transport sensor.

Thanks to David for all his initial work.

18

Here is the code.

I hope this useful for someone out there.

6 Likes

Hi,
Thanks a lot for the code. I tried to integrate it to my setup, but I do not understand which entity I need to add. For the MVG-Card, it’s the MVG-Sensor obviously. I didn’t find a RMV sensor so I tried the DB sensor - no luck. Can you share a minimal example from your ui-lovelace.yaml?
Best

1 Like

The code is not out of beta yet, so, unless you are already running 0.76.0b5 you have to wait fo the release of 0.76.

There is an example in the docs.

1 Like

Here is a simple configuration to serve as an example:

ui-lovelace.yaml:

title: My Awesome Home

resources:
  - url: /local/rmv-card.js
    type: js

views:
  - title: RMV Example
    cards:
      - type: "custom:rmv-card"
        entity:
          - sensor.frankfurt_main_hauptbahnhof

configuration.yaml:

sensor:
  - platform: rmvtransport
    next_departure:
    - station: 3000010
      time_offset: 5
      destinations:
        - 'Frankfurt (Main) Flughafen Regionalbahnhof'
        - 'Frankfurt (Main) Stadion'
      products:
        - 'RB'
        - 'RE'
        - 'Bus'
        - 'S'

Hi!
So I updated my system, and managed to implement the feature. Works great, looks great. The only issue I encountered is that the time displayed is a little weired. Instead of seeing something like 8 minutes, I get something around -120.
I guess something is mixed up with the timezones. Any idea?
Cheers

Interesting. Could you provide more details about your config? PM is fine if you don’t want to share all that publicly.

The problem should be fixed with the latest code/gist.

Thank you it works very well for me :slight_smile:
But i don’t use ui-lovelace.yaml.
I have pasted the:

resources:
  - type: js
    url: /local/rmv-card.js?v=0

and

 - entity: sensor.durerplatz
        type: 'custom:rmv-card'

via the RAW Editor.

59

1 Like

Thanks for the feedback. It makes me happy to hear from people using it.

Hi Tobi,

Great work on the customized RMV card!

I just integrated it but got strange values for the departures (even though the next departure will be in 24 minutes).

image

I’m using a pretty standard configuration:

  - platform: rmvtransport
    next_departure:
     - station: 3004397
       products:
         - 'U-Bahn'

Any idea?

Thanks!

1 Like

Thanks. I can’t take credits for the lovelace card though. I’ll replicate this config in my dev environment to get some insights. I’ll get back to you.

Looks ok here.

At what time did you see those strange values?

The strange time only appear around midnight.

I’ll take a look, but are you sure that there will actually be a train sooner?

No, there will be trains departing earlier.
1466 minutes would be a bit more than 24 hours.

Could that be a timing issue around midnight ?

It most certainly is. I’ll put that on my list but I wont get around before two weeks from now. Thanks for your patience.

since a few weeks the HA log thows errors:

any idea?

How did you add the rmv-card.js?

Hi @cgtobi! :slight_smile:

a year before it was integrated in HACS. Today I can’t find it anymore.

In
<host>:8123/config/lovelace/resources I find this entry:
/hacsfiles/rmv-card/rmv-card.js (Javascript)

regards

Hit the plus icon and try again