Compare commits

...

2 Commits
main ... main

Author SHA1 Message Date
Von Birne a4d873becd i3pystatus/ice-status.py cast time to int 2 months ago
Von Birne 7d541c9f7e i3pystatus/ice-status.py change api url 2 months ago
  1. 6
      .config/i3pystatus/ice-status.py

6
.config/i3pystatus/ice-status.py

@ -33,11 +33,11 @@ try:
now = datetime.now()
trip_info_req = get('https://portal.imice.de/api1/rs/tripInfo/trip')
trip_info_req = get('https://iceportal.de/api1/rs/tripInfo/trip')
trip_info_req.raise_for_status()
trip_info = trip_info_req.json()['trip']
ice_status_req = get('https://portal.imice.de/api1/rs/status')
ice_status_req = get('https://iceportal.de/api1/rs/status')
ice_status_req.raise_for_status()
ice_status = ice_status_req.json()
@ -67,7 +67,7 @@ try:
ice_status['speed'],
next_stop,
ice_status['connectivity']['currentState'],
format_time(ice_status['connectivity']['remainingTimeSeconds']),
format_time(int(ice_status['connectivity']['remainingTimeSeconds'])),
ice_status['connectivity']['nextState'],
))
except Exception as e:

Loading…
Cancel
Save