ha-deutschebahn icon indicating copy to clipboard operation
ha-deutschebahn copied to clipboard

[Feature Request]: Add attributes 'departure_current' and 'arrival_current'

Open bcutter opened this issue 2 years ago • 1 comments

The request

Add two new attributes:

  • combine the existing departure attribute with the also existing delay attribute to provide the new departure_current attribute
  • combine the existing arrival attribute with the also existing delay_arrival attribute to provide the new arrival_current attribute

This way we can easily get the actual (current) departure / arrival times. No additional math on user side needed.

Is your feature request related to a problem?

The problem is, that if you have "16:47 +23" you have to calculate on your own (either in your head or by additional templating involving some significant Jinja magic) what the actual time including the delay is.

Additional information

https://community.home-assistant.io/t/configuration-deutsche-bahn-integration/402377/10

bcutter avatar Dec 01 '23 14:12 bcutter

Work is being done here: https://github.com/FaserF/ha-deutschebahn/pull/26

FaserF avatar Dec 04 '23 10:12 FaserF

Please give it a try with the new version 3.0.0-b1 https://github.com/FaserF/ha-deutschebahn/releases/tag/3.0.0-b1

FaserF avatar Jun 09 '24 14:06 FaserF

Works great! Installed https://github.com/FaserF/ha-deutschebahn/releases/tag/3.0.0, adjusted my whole GUI (quite a lot of work with all the attributes, especially as the native attribute card can not handle arrays so I had to switch to custom:template-entity-row and do everything by hand) and added the new attributes.

Perfect, thank you very much! Those new attributes are very helpful.

bcutter avatar Jul 24 '24 22:07 bcutter