Fixed sää.py claiming to forecast stuff

This commit is contained in:
Jarno Rankinen 2022-11-14 21:06:58 +02:00
parent 4709d3d821
commit 2cab1e06d0
1 changed files with 13 additions and 7 deletions

View File

@ -23,15 +23,21 @@ class MatrixModule(BotModule):
elif weather['winddir'] >= 293 and weather['winddir'] < 338: elif weather['winddir'] >= 293 and weather['winddir'] < 338:
winddir = 'luoteesta' winddir = 'luoteesta'
weathermsg = f"""\ time = weather['timestamp'].split()[1]
Lämpötila on tällä hetkellä {weather['tempnow']} astetta.
Ilmankosteus on {weather['humidity']}% ja sadetta on odotettavissa weathermsg = f"""Sää klo {time}:
seuraavan tunnin aikana {weather['precipitation1h']}mm
ja tulevan vuorokauden aikana {weather['precipitation1d']}mm. Lämpötila on tällä hetkellä {weather['tempnow']} astetta.
Tulevan vuorokauden alin lämpötila on {weather['templo']} astetta
ja ylin {weather['temphi']} astetta.
Ilmankosteus on {weather['humidity']}%.
Tuuli puhaltaa {winddir} nopeudella {weather['windspeed']}m/s, voimakkuus Kuluneen tunnin sademäärä on {weather['precipitation1h']}mm
puuskissa on {weather['windspeedmax']}m/s""" ja kuluneen vuorokauden {weather['precipitation1d']}mm.
Tuuli puhaltaa {winddir} nopeudella {weather['windspeed']}m/s
voimakkuus puuskissa on {weather['windspeedmax']}m/s"""
await bot.send_text(room, weathermsg, event) await bot.send_text(room, weathermsg, event)