widgets: DE_ICE: Handle missing train numbers

This commit is contained in:
embr 2022-10-26 16:32:04 +02:00
parent 98a4efd1cd
commit ed52c314d7

View file

@ -5,7 +5,10 @@ if [ -n "$AMBIENT_DE_ICE_STOP_NEXT_ARRIVE_DELAY" ]
echo "$AMBIENT_DE_ICE_STOP_NEXT_ARRIVE_DELAY"
end
if set -q AMBIENT_DE_ICE_TRAIN_TYPE
echo "🚄 $AMBIENT_DE_ICE_TRAIN_TYPE-$AMBIENT_DE_ICE_VZN"
echo -n "🚄 $AMBIENT_DE_ICE_TRAIN_TYPE"
# If iceportal.de is having a moment, we may not have the train number.
set -q $AMBIENT_DE_ICE_VZN; and echo -n "-$AMBIENT_DE_ICE_VZN"
echo
end
if set -q AMBIENT_DE_ICE_SPEED
echo "💨 $AMBIENT_DE_ICE_SPEED km/h"