neuhausf / lovelace-swiss-stationboard

Swiss public transport stationboard for Home Assistant dashboard
MIT License
7 stars 5 forks source link

Setting departure countdown to 0 if set in config #2

Closed r3turnNull closed 1 year ago

r3turnNull commented 1 year ago

On line 115 of swiss-stationboard.js you check if departure_countdown is set in config. But if it is set, you're setting the countdown value to 0 and hence disabling it. Instead, after the ternary operator, the configured value for departure_countdown should be used.

line in current source: const departure_countdown = 60 * (this._config.departure_countdown === undefined ? 15 : 0);

line with fix: const departure_countdown = 60 * (this._config.departure_countdown === undefined ? 15 : this._config.departure_countdown);