Nederlandse Spoorwegen Card + help needed

Hi guys,

I made my first card this week using the NS (Nederlandse Spoorwegen) API sensor, doc found here:

You can see what it looks like. When delayed it will add ‘+3’ in red after the time. Platform and delay will automatically update. Might still need some minor improvements.

Github Repo:

Screenshot of the error:

Issue has been fixed. Custom JS declared now in lovelace instead of configuration.yaml.

Hi, nice! Can you post the logic of the card? :slight_smile:

Hi, what do you mean by logic?

Hey there, I think @firstchair was asking if you could share the content of your “ns-status-card.js” file, so we also can try it. I will appreciate it as well.

Yes of course. will add the full code to Github tomorrow and will post the link here once it’s available.

1 Like

Github Repo added!

1 Like

The card is great, but I just tried the NS integration to get the next train. But updates are so slow I mostly get the previous train. What do you use for settings to get meaningful results? Always one with a set time? Because that is not that useful for school when the first class is different all the time.

@Edwin_D did you find a solution? Standard updates every half hour indeed and is also too slow for me.

Nope, sorry. Didn’t have time to pursue this further. Looked a bit at the code though. The API seems suitable to use only few updates and still be able to have future trains as well by asking more alternatives at the same time. But it will require some programming to show the right one at the right time. I’m not in a position to do so.

1 Like

it’s been some time. did you manage to increase the interval?

No, I don’t have the time.

image

when i try to add it through HACS i get this error… in the description it is saying lovense category but that doesn;t exist anymore

the manual instructions are also not very clear to me …

can someone help