This is a Scriptable widget is a costumized version of mzeryck's Weather-Cal widget. For German users I added functionality to display the left data volume of your T-Mobile data plan and some Covid-19 data from Robert-Koch-Institute. This is a Scriptable widget is a fork of the weather-cal.js from Max Zeryck (https://github.com/mzeryck/Weather-Cal). Everything about the Script is explained on his GitHub project.
What I did is to add functionality for a small group of people in the custom item section of his script. In that way I added the left data volume of your T-Mobile data plan, some Robert-Koch Institut data about Covid-19 (new Cases in Germany, the incidence value of the local or a fixed state area and the new cases in that area).
The Data form Robert-Koch Institute is used under the license of Robert Koch-Institut (RKI), dl-de/by-2-0
- Max Zeryck (mzeryck / https://github.com/mzeryck/Weather-Cal) for this awesome pice of work. He developed this great widget script and is responsible for the possibility to add custom functions (items) to his widget without losing the chance to use his improvements by opening his widget to third party functions.
- Markus Wittmann for pointing me to Max's script and the idea to implement own or additional functions.
- olikdesign (https://gist.github.com/olikdesign) for his "Telekom Datenvolumen" Widget, wich helped me a lot to implement the T-Mobile Dataplan function.
- Kevin Kub (kevinkub / https://gist.github.com/kevinkub/46caebfebc7e26be63403a7f0587f664) for his ideas on using the RKI data in Scriptable Widgets. He was the one who got a lot attention on his widget in Germany.
- Raphael (rphl / https://github.com/rphl/corona-widget) and tzschies (https://github.com/tzschies/incidence) for forking Kevin's widget and bringing up a lot of new ideas on how to use the RKI data.
tmobile:
This item shows your data left from your T-Mobile Germany data plan. It requires data connectivity over the mobile network to get or refresh the data. A red antenna means there is no data connectivity over the mobile network (you are using wifi f.e.) or it is read from cache since it's not outdated. A green antenna means you got fresh data over the mobile network. The green bullet means you used less than 75% of your data plan, it turns orange between 75% and less than 90% and red if you have used 90% or more. You can change the text after the volume left in the configuration section (see below) of the code.
c19de:
This item shows yesterday's new covid-19 cases from the Robert-Koch Institute. You can change the text after the new cases in the configuration section (see above) of the code.
c19rki:
This item shows yesterday's incidence value and new covid-19 cases from the Robert-Koch Institute. You are able to set the limits for the color bullets, the number of letters for the area name, your own area name and geodata for a fixed place in the configurations section (see below) of the code.
Version 0.89 (08/16/2023)
- Due to RKI discontinueing to refresh the API Date on June 2nd an switching to huge flat-files, which can not be used by iOS-Widgets, I changed to the 3rd Party API rki-covid-api (https://github.com/marlon360/rki-covid-api) of Marlon Lückert (https://github.com/marlon360). Thanks for your Work Marlon and also thanks to Peter Markewitz (https://github.com/Rubber1Duck), who is maintaining the API.
Version 0.88 (03/09/2023)
- Changes the RKI COVID-19 API call since the RKI changed the API.
Version 0.87 (02/17/2022)
- Changed the RKI COVID-19 API call since thr RKI changed the API.
Version 0.86 (11/14/2021)
- Removed not working vodafone support.
- Removed the Covid-19 values state websites since they changed and were not working anymore.
Version 0.85 (12/22/2020)
- I changed caching of the T-Mobile informations to the functions of the base script. This should not have any effect on your use, besides you are able to set after what time a refresh should be done.
- I introduced caching to the RKI and state Covid-19 data, so its not read from an extern source that often. You are able to set the refresh time in minutes for each item.
- I added support for the Vodafone Germany data plan. This is very experimental since I don't own a Vodafone Dataplan on my own and I have no idea if this works. Feel free to test it and give me feedback.
Version 0.84 (12/15/2020)
- Removed trailing comma in the layout, since they are raising errors in Max new version.
Version 0.83 (12/01/2020)
- I added Berlin to the c19state item.
Version 0.82 (11/29/2020)
- I added more states to the c19state item. (Hamburg, Hessen, Bayern, Schleswig-Holstein, Rheinland-Pfalz)
- There was an issue with the dark red bullets, that were never used if the incidence value was over 100.
Version 0.81 (11/29/2020)
- There was an issue (Error on using c19Settings) if you use own geodata. This is fixed now.
Version 0.80 (11/29/2020)
- Very first test version using the new custom area of Max's script.
Configuration inside the code is already done, if you use the above code. But you have to change the configuration of the script by starting it from the scriptable app and then chose "Edit preferences". To get the above result I used the following configuration.
Localization and text customization:
The configuration inside the code has to be changed. You have to change the layout like this:
Everything else inside the code is fine as it is to start with.