new file: .gitignore

modified:   app.py
This commit is contained in:
SimolZimol
2026-04-21 09:03:49 +02:00
parent 2a9882c0aa
commit 816565c71a
3 changed files with 40 additions and 9 deletions

32
.gitignore vendored Normal file
View File

@@ -0,0 +1,32 @@
# .env Datei wird in Coolify über Environment Variables verwaltet
.env
# Node.js (falls alte Generator-Dateien noch da sind)
node_modules/
package-lock.json
# Logs
logs/
*.log
# OS
.DS_Store
Thumbs.db
# IDE
.vscode/
.idea/
*.swp
# Backups
backups/
*.tar.gz
# Alte Generator-Dateien (nicht mehr benötigt)
server.js
views/
public/
Dockerfile
.dockerignore
package.json
create-minecraft-server.sh

Binary file not shown.

17
app.py
View File

@@ -12,15 +12,14 @@ app = Flask(__name__)
# ── Parameter (wetterdienst ≥ 0.100, Format: resolution/dataset/parameter) ─── # ── Parameter (wetterdienst ≥ 0.100, Format: resolution/dataset/parameter) ───
MOSMIX_PARAMS = [ MOSMIX_PARAMS = [
"hourly/small/temperature_air_mean_2m", "hourly/large/temperature_air_mean_2m",
"hourly/small/wind_speed", "hourly/large/wind_speed",
"hourly/small/wind_direction", "hourly/large/wind_direction",
"hourly/small/wind_gust_max_last_1h", "hourly/large/wind_gust_max_last_1h",
"hourly/small/cloud_cover_total", "hourly/large/cloud_cover_total",
"hourly/small/pressure_air_site_reduced", "hourly/large/pressure_air_site_reduced",
"hourly/small/precipitation_height_significant_weather_last_1h",
"hourly/small/sunshine_duration",
"hourly/large/precipitation_height_last_1h", "hourly/large/precipitation_height_last_1h",
"hourly/large/sunshine_duration",
"hourly/large/probability_precipitation_height_gt_0_1mm_last_1h", "hourly/large/probability_precipitation_height_gt_0_1mm_last_1h",
] ]
@@ -101,7 +100,7 @@ def get_mosmix_forecast(lat, lon, hours=72):
gust_kmh = round(float(fx1) * 3.6, 1) if not _isnan(fx1) else None gust_kmh = round(float(fx1) * 3.6, 1) if not _isnan(fx1) else None
pppp = params.get("pressure_air_site_reduced") pppp = params.get("pressure_air_site_reduced")
pressure = round(float(pppp), 1) if not _isnan(pppp) else None pressure = round(float(pppp), 1) if not _isnan(pppp) else None
# Niederschlag: rr1c (significant) oder rr1 (gesamt) als Fallback # Niederschlag: rr1 (gesamt)
rr1c = params.get("precipitation_height_significant_weather_last_1h") rr1c = params.get("precipitation_height_significant_weather_last_1h")
rr1 = params.get("precipitation_height_last_1h") rr1 = params.get("precipitation_height_last_1h")
precip_raw = rr1c if not _isnan(rr1c) else (rr1 if not _isnan(rr1) else None) precip_raw = rr1c if not _isnan(rr1c) else (rr1 if not _isnan(rr1) else None)