Newer
Older
ice_speed / main.py
@lukas lukas on 4 Aug 2021 349 bytes inital commit
import requests
import time
import notify2

notify2.init("ICE")
current = 0
while True:
	result = requests.get("https://iceportal.de/api1/rs/status")
	speed = result.json()["speed"]
	if speed != 0:
		if current != speed:
			n = notify2.Notification("ICE SPEED UPDATE", "new ICE speed: %s km/h" % speed)
			n.show()
			current = speed
	time.sleep(1)